:bug: Analyzer improvements
- **Cppcheck support** (3680)
Cppcheck is a static analyzer tool which is now driven by CodeChecker. Similar to Clang analysis, [Cppcheck](https://cppcheck.sourceforge.io/) also can be configured and executed by CodeChecker. For configuration and execution see [Configure Clang Static Analyzer and checkers Guide](https://github.com/Ericsson/codechecker/blob/master/docs/analyzer/checker_and_analyzer_configuration.md#cppcheck)
Please note that you need to add cppcheck to your PATH (env var) before using it with CodeChecker.
**WARNING**: The analysis results depend on which cppcheck version you configured
- **Merge, and don't override when multiple --analyzer-configs are specified** (3655)
When multiple `--analyzer-config` options are given to CodeChecker then only the last one was taken into account. From this version both are handled: `--analyzer-config <option1> --analyzer-config <option2>`. The old format is also still available: `--analyzer-config <option1> <option2>`.
:computer: CLI/Server improvements
- **Refactored Review Status Handling**
- **Changed handling of in-code suppressions (e.g. //codechecker_suppress [ all ] This is a false warning)** (3580)
Review status is now connected to the individual reports instead of the (all reports) with the same report hash.
This makes it possible to mark a bug as a false positive on one branch (and store it in a run) and mark it as intentional on another branch.
**Warning:** The different handling of such rare cases can cause a change in the checker statistics.
- **Changed handing of suppressions in the GUI** (3646)
If you handle suppressions in the GUI instead of the source code, the suppressions remain effective for all reports identified by the same bug hash. These are called "suppression rules". You can list and manage such rules in the "Review Status Rules" window:
![image](https://user-images.githubusercontent.com/8030953/186143044-96ee1b76-651f-4cca-8fba-32e6b2d23126.png)
- **Changed visualization of false positive and intentional reports in the Oustanding Reports Statistics**
Outstanding report statistics excluded false positive reports from the graphs even for time periods, when these reports were active. After this change, the reports will be counted in the outstanding reports graphs until the time they were classified as false positive. So you will be able to see a decreasing trend in the outstanding reports graph, after you classify reports false positive.
![image](https://user-images.githubusercontent.com/8030953/186143148-a2cf254c-e684-4c44-8f8f-2e8173f58a73.png)
- **Find reports by file anywhere on bugpath** (3717)
In the GUI the set of reports can be filtered by filename or source
component. However, these filters are concerning the last bug point,
i.e. one can list the set of reports ending in a specific file.
A new filter option has been introduced which returns all reports where the file is involved at any part of the bug path.
![image](https://user-images.githubusercontent.com/8030953/186632120-738727c6-12aa-47dd-bd78-3ce9002c7460.png)
- **Fix storage of headers with same name in different paths** (3706)
When a header file occurred in multiple directories with the same name (for example multiple standard libraries at different locations are involved in the project) then only one of them was stored to the server. This has been fixed, so all instances are stored now.
- `--trim-path-prefix` flag may now contain joker characters (3674)
`--trim-path-prefix` flag helps to remove a given prefix of each file path during report storage. This prefix may now contain joker characters too. The longest matching prefix will be eliminated from each file path.
- **Don't ignore compiler warnings, even if `clangtidy:take-config-from-directory=true` is specified** (3698)
`clangtidy:take-config-from-directory` is an analyzer config that makes ClangTidy get its arguments from a `.clang-tidy` file, and only from that
file. What this implies, is that all other options on the command line for ClangTidy will be ignored. The problem was that this also ignores compiler warnings, so it has been fixed.
- **Garbage collection enhancement in "files" table** (3710)
When a run storage and removal occurs concurrently with both referring the same file may result a foreign key constraint error on server side and storage fails. This has been fixed.
- **Import the suppressions per report** (3693)
`CodeChecker cmd suppress run_name -i <import_file>` will only import suppressions for the run indicated by `run_name`, and not all reports in all runs.
- **Fix remote diff behavior** (369)
When two runs are compared then reports should be considered as closed even if their review status is false positive or intentional.
- **Speed up run deletion** (3700)
Sometimes run deletion is a slow operation due to cascades and such. So runs are deleted in separate transactions in order to avoid potential statement timeouts in a DBMS.
- **Get failed files with `CodeChecker cmd runs --details`** (3669)
This command now lists the files that are failed to analyze.
- **Fix storage of context-insensitive ClangSA reports** (3662)
In some cases ClangSA produced plists where an included file had a context-insensitive bug report at the exact same "file:row:col:checker", but different bug hash. Only one instance of these reports were stored before this release.
- **Fix exceptions during blame information storage* (3647)
When the HEAD file exists in the `.git` directory but the user who is running the CodeChecker store command doesn't have permission to this file then the storage failed.
- **Fix uniqueing compilation commands** (3635)
:repeat: Profile changes
- **The following checkers are added to the following profiles** (3714)
- `alpha.unix.Errno`: extreme
- `bugprone-assignment-in-if-condition`: default, sensitive, extreme
- `misc-const-correctness`: extreme
- `misc-confusable-identifiers`: default, sensitive, extreme
- `modernize-macro-to-enum`: extreme
- **All cppcheck checker from the error and warning category have been added to the default profile**
:book: Documentation updates
- **Refactoring the analyzer user guide** (3694)
- **Checker documentation URLs have changed in ClangTidy** (3715)
- **Fix some links in `README.md`** (3512)
- **Enhancement of the user guides related to the run comparison feature** (3696)
- **Fix some CLI usage examples in the docs** (3666)
- **Add documentation to the python thrift client example** (3652)
:hammer: Other improvements/fixes
- **Fix ctu extdef mapping file with space problem** (3653)
CodeChecker uses `clang-extdef-mapping` utility during CTU analysis. This collects for each function definition in which file they have been defined. The format of this mapping file changed, and this change needs to be adapted in CodeChecker.
- **Adding `dev_package` make target** (3682)
This make target results symlinks in the build directory to the source files. This way it is not necessary to rebuild CodeCompass for each source code change during the development. Known issue: `CC_LIB_DIR` needs to be set to `.../build/CodeChecker/lib/python3` directory.
- **Fix install of PPA clang-tidy in config coverage job** (3678)
Fixing a broken installment in GitHub Actions.
- **Add a job that checks coverage of checker labelling** (3367)
- **Minor improve some debug logs** (3659)
There was a debug log which could not be used for debugging, because the arguments containing whitespaces were not quoted properly.