Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
https://codechecker.readthedocs.io
Apache License 2.0
2.15k stars 358 forks source link

Display warning if the compilation database is empty #4226

Closed noraz31 closed 2 months ago

noraz31 commented 2 months ago

Change the log level from info to warning when nothing was analyzed due to eg an empty compilation database. Fixes #4222

Szelethus commented 2 months ago

The implementation is correct, but I whether we went far enough. When is analyzing an empty database desirable? Can we not emit an error with return code 1?

bruntib commented 2 months ago

In case of incremental analysis in could be valid providing an empty compilation database. Also, in case of commits where a module is changed, but the analysis of the module itself is skipped.

Szelethus commented 2 months ago

Very well. I suppose we could emit an error when the input json is technically empty, but not at this point.