v6.13.0
New feature highlights
New web UI
In this release the UI framework was completely replaced to increase usability, stability and performance.
The new framework allows a lot of improvements like:
- faster page load
- faster navigation
- improved front-end testing
- less load on the server
With the new UI the permalinks are backward compatible so the saved URLs should work as before.
Additionally to the UI improvements there is a new feature.
If Unique reports
is enabled on the reports view there is a drop down list for each report showing the similar reports
with the same report hash (but maybe with a different execution path)
Note! When building the package nodejs newer than v10.14.2 is required!
Please check the install guide for further instructions on how to install the dependencies.
Apply checker fixits
Some checkers in Clang-Tidy can provide source code changes (fixits) to automatically modify the source code
and fix a report. This feature can also be used to modernize the source code.
To use this feature the clang-tidy
analyzer and the clang-apply-replacements
tools needs to be available in the PATH.
During the clang-tidy analyzer execution the fixits are automatically collected.
CodeChecker analyze -o report_dir -j4 -e modernize -e performance -e readability compile_command.json --analyzers clang-tidy
Use the CodeChecker fixit report_dir
command to list all collected fixits.
Fixits can be applied for a source file automatically like this:
CodeChecker fixit report_dir --apply --file "*mylib.h"
or in interactive mode where every source code modification needs to be approved:
CodeChecker fixit report_dir --interactive --file "*mylib.h"
Fixits can be applied based on a checker name, so to cleanup all the readability-redundant-declaration
results execute this command:
CodeChecker fixit report_dir --apply --checker-name readability-redundant-declaration
Coding guideline mapping to checkers (SEI-CERT)
There are coding guidelines like (SEI-CERT, C++ Core Guidelines, etc.) which contain best practices on avoiding common programming mistakes. To easily identify which checker maps to which guideline the--guideline
flag was introduced.
To list the available guidelines where the mapping was done, use this command:
CodeChecker checkers --guideline
The checkers which cover a selected guideline can be listed like this:
CodeChecker checkers --guideline sei-cert
If we want to get which checker checks the sei-cert rule err55-cpp
by executing
the command below we can get that the bugprone-exception-escape
checker should be enabled if the err55-cpp
rule needs to be checked.
CodeChecker checkers --guideline err55-cpp
bugprone-exception-escape
More detailed information about the checkers and the guideline mapping can be found by executing
this command:
CodeChecker checkers --guideline sei-cert --details
Makefile output
CodeChecker can generate a Makefile without executing the analysis.
The Makefile will contain all the necessary analysis commands as build targets.
With this Makefile the analysis can be executed by make
or by some distributed
build system which can use a Makefile to distribute the analysis commands.
Locally with a simple make
it can be executed like this:
CodeChecker analyze --makefile -o makefile_reports compile_command.json
make -f makefile_reports/Makefile -j8
On demand CTU analysis support
With this new flag (--ctu-ast-mode
) the user can choose choose the way ASTs are loaded during CTU analysis.
There are two options:
load-from-pch
(the default behavior now, works with older clang versions v9 or v10)parse-on-demand
(needs clang master branch or clang 11)
The mode 'load-from-pch' can use significant disk-space for the serialized ASTs.
By using the 'parse-on-demand' mode some runtime CPU overhead can incur in the second phase of the analysis but uses much less disk space is used.
Execute this command to enable the on-demand
mode:
CodeChecker analyze -j4 -o reports_ctu_demand --ctu --ctu-ast-mode parse-on-demand
See the pull request for more information.
Disable all warnings like checker groups
Clang compiler warnings are reported (clang-tidy) by checker names staring with clang-diagnostic-
.
Disabling them could be done previously only one-by-one.
In this release the warnings can be disabled now with the corresponding checker group.
CodeChecker analyze --analyzers clang-tidy -d clang-diagnostic
IPv6 support
The CodeChecker server can be configured to listen on IPv6 addresses.
Performance improvements
- diff command printing out source code lines got a performance improvement #2772
- report storage performance got improved #2804
Changes
- DEPRECATED flag!
--ctu-reanalyze-on-failure
flag is marked as deprecated and it will be removed in one of the upcoming releases.
It will be removed because the Cross Translation Unit (CTU) analysis functionality got more stable in the Clang Static analyzer so this feature can be removed.
Other improvements and changes
There are a lot of further improvements and bug fixes in this release.
The full list of changes can be found here.
Contributors
Big thanks to everyone who helped us creating this release: @sylvestre @thresheek