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

analyze only a given file list #1195

Closed gyorb closed 4 years ago

gyorb commented 7 years ago

The analyze command requires a compilation command json file and will run the analysis on all of the files in it right now.

With an extra parameter a file list could be given to the analyze command so only the files in that list will be analyzed if the corresponding compilation command was found.

whisperity commented 7 years ago

Is this file list in a text file? Or an arbitrary-long argument vector handled by argparse itself? If it is a file, what will be its format?

gyorb commented 7 years ago

It thought about a simple text file. Which can be easily generated with a git command for example.

main.cpp
lib1/lib1.cpp
libb2/lib2.cpp
bruntib commented 6 years ago

There is already a solution for this: CodeChecker analyze subcommand can be given a -s, --ignore or --skip flag in which one can list the files to ignore or enable. The difference compared to this ticked is that the default is "enabled" for a path. This ticket says that the default behavior should be to "ignore" a file. However this also can be expressed:

+/a/b/c/*
+/x/y/z/*
-*

The file format is also different from this skipfile, but I don't think we should introduce another config file with different format.

bruntib commented 4 years ago

I think the skipfile is a solution for this issue. Please, reopen if the feature request is still relevant.