<div dir="ltr">Hi Csaba, thanks for the quick reply.<div><br></div><div>I have a build system which builds multiple files concurrently.</div><div><br></div><div>Because of this, the diagnostics get interleaved and it is hard to understand the output.</div><div><br></div><div>Additionally, I'd like to machine parse the diagnostics by a plugin to atom text editor so I can highlight lines, present a useful list of errors, provide navigation, etc.</div><div><br></div><div>What you've suggest looks good if you can invoke clang just once, or if you invoke it multiple times, collect all the output and then merge it together. I was hoping there might be a simple solution, e.g.</div><div><br></div><div>rm database.sqlite3</div><div>clang -c foo.c --diagnostic-database=database.sqlite3</div><div><div>clang -c bar.c --diagnostic-database=database.sqlite3</div></div><div><div>clang -c baz.c --diagnostic-database=database.sqlite3</div></div><div><br></div><div>The finally I could inspect database.sqlite3 to see a list of all diagnostics. Ideally, you'd still get the PTY colourized output too - the database would be an additional option to coalesce unique errors over a large code-base and give a structured format for understanding the diagnostics that could be processed by an editor or other tool.</div><div><br></div><div>Ideally this would be an open standard, e.g. this line, this character range, and could be used across multiple tools, e.g. gcc, python, ruby, etc.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 25 February 2015 at 10:13, Csaba Raduly <span dir="ltr"><<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Samuel,<br>
<br>
What do you mean by "unique"? Do you mean something like<br>
<br>
clang -Wall -pedantic -Wextra -c *.c | perl -pwle<br>
's/^\S+?:(\d+:)?(\d+:)?\s*//' | sort | uniq -c<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Feb 24, 2015 at 2:21 PM, Samuel Williams wrote:<br>
> I'm interested in a way to collect unique errors/diagnostics over multiple<br>
> files in a single build. Does such a thing exist? e.g. some kind of database<br>
> that could be shared between multiple concurrent instances of clang which<br>
> would allow me to review all unique errors across an entire code base,<br>
> ideally in real time but perhaps once the build completes would be okay to<br>
> start with too. Thanks.<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">Csaba<br>
--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
"People disagree with me. I just ignore them." -- Linus Torvalds<br>
</font></span></blockquote></div><br></div>