Infer analyzer won't work as intended
Describe the bug
If CodeChecker CLI is run with Infer analyzer it won't work. Per my understanding infer required compilation database; that is compile_commands.json generated by CMake rather than compiler command passed down from CodeChecker. The latter is the case because when infer is selected for analyzer, it complains the chosen toolchain (rather than compilation database) is not recognized.
Furthermore, one cannot pass --force-integration=cc command, understood by infer, through CodeChecker.
CodeChecker version
[INFO 2025-05-06 21:57] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind | Version
---------------------------------------------------------------
Base package version | 6.25.1
Package build date | 2025-04-28T22:54
Git commit ID (hash) | c63dcdd8aa8dbd47360a0a02234c94e45107fb76
Git tag information | 6.25.1
---------------------------------------------------------------
To Reproduce
CodeChecker analyze ./compile_commands.json --analyzers infer --enable-all where cross-compilation toolchain arm-none-eabi-g++ is used rather than mainstream GCC.
Expected behaviour What you expected to happen.
Desktop (please complete the following information)
- OS: Ubuntu 24.04 LTS
Additional context This is the actual log after executing the aforementioned command line:
[INFO 2025-05-06 21:47] - '--enable-all' was supplied for this analysis.
[INFO 2025-05-06 21:47] - Enabled checker list can be found in metadata.json
[INFO 2025-05-06 21:47] - Starting static analysis ...
[ERROR 2025-05-06 21:47] - Usage Error: Unsupported build command 'arm-none-eabi-g++'.
If this is an alias for another build system that infer supports, you can use `--force-integration <command>` where <command> is one of the following supported build systems:
ant buck1 buck2 cc erlc gradle hackc java javac kotlinc make mvn ndk-build python3 rebar3 xcodebuild
Flags of analyzer tools that are not wired to the CodeChecker interface, like --force-integration=cc can be given like so:
CodeChecker analyze compile_commands.json -o reports --analyzer-config infer:cc-verbatim-args-file=<file_path>
The <file_path> is the path of a text file that contains --force-integration=cc. Would you think, this answers this ticket?