Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for static and dynamic analyzer tools.
https://codechecker.readthedocs.io
Apache License 2.0
2.28k stars 383 forks source link

Support clang-tidy and static analyzer notes #381

Closed Xazax-hun closed 5 years ago

Xazax-hun commented 8 years ago

Clang tidy sometimes output notes. These notes are connected to a warning and provides the user with additional information e.g.: where a variable was declared. This is not part of path sensitive information. It would be great to store/display those notes.

Also note that, the clang static analyzer will also support and emit notes in the next release: https://reviews.llvm.org/D24278

gyorb commented 8 years ago

Notes are parsed from the clang-tidy output and a bug event is created from it in the generated plist. I think we should still use the plist output from the clang static analyzer even if notes are supported in the next release. A plist output would be better from clang-tidy too.

Xazax-hun commented 8 years ago

I am not sure that an event is a good way to store a note. The notes are not path sensitive pieces of the reports. And sometimes I get unspecified empty name results from tidy. Maybe there is a bug lurking in the output parser.

Xazax-hun commented 8 years ago

This requires work at both the client and server side and the schema will change.

Xazax-hun commented 8 years ago

Note that, the notes are not emitted to the plist yet: https://github.com/llvm-mirror/clang/blob/master/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp#L284

gyorb commented 8 years ago

Could you provide some cland-tidy output which we fail to parse correctly?

Xazax-hun commented 8 years ago

Oh, the issue I experienced might be unrelated to the title. Here is a sqlite database of a run that has some check results without name: https://dl.dropboxusercontent.com/u/4131903/codechecker.sqlite.tar.lz

gyorb commented 8 years ago

I've created a new issue for the check results without the name, that problem should be discussed further there.

csordasmarton commented 5 years ago

I think this issue has already been solved in #1818. What do you think @gyorb?

gyorb commented 5 years ago

Yes, it is done we can close this.