Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cppcheck analysis limit. #4446

Open
fjpanag opened this issue Feb 3, 2025 · 0 comments
Open

Cppcheck analysis limit. #4446

fjpanag opened this issue Feb 3, 2025 · 0 comments

Comments

@fjpanag
Copy link

fjpanag commented Feb 3, 2025

Describe the bug
I am getting lots of warnings from cppcheck: cppcheck-normalCheckLevelMaxBranches.

It prompts me to:

Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

This is indeed an expected behavior from cppcheck, and indeed enabling --check-level=exhaustive resolves the issue (in stand-alone cppcheck).

However, as far as I can tell, it is not possible to enable this setting through CodeChecker.

Please consider enabling this option (or providing a CodeChecker option to enable the respective cppcheck option).

I spend a considerable amount of time to resolve this, but I didn't succeed. If this is already possible, please consider improving the documentation on this matter.

CodeChecker version

bash-5.2$ CodeChecker version
[INFO 2025-02-03 22:26] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version                                 
---------------------------------------------------------------
Base package version | 6.24.4                                  
Package build date   | 2024-10-28T15:46                        
Git commit ID (hash) | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information  | 6.24.4                                  
---------------------------------------------------------------

[INFO 2025-02-03 22:26] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version                                 
------------------------------------------------------------------------------
Base package version                | 6.24.4                                  
Package build date                  | 2024-10-28T15:46                        
Git commit ID (hash)                | 454d978191ed42c8202a2244dc092dfb6fd8c83a
Git tag information                 | 6.24.4                                  
Server supported Thrift API version | 6.58                                    
Client Thrift API version           | 6.58                                    
------------------------------------------------------------------------------

To Reproduce

Run CodeChecker, with cppcheck enabled, on a file with deep enough branches to trigger the issue.

Expected behaviour

Have a CLI option in CodeChecker to enable exhaustive analysis with cppcheck.

Desktop (please complete the following information)

  • OS: Fedora 41
  • Browser: Firefox

Additional context

Not sure if it is important, but this is how CodeChecker is invoked in my case:

CodeChecker analyze ./bin/code_checker/compile_commands.json --enable sensitive \
	--disable cppcheck-preprocessorErrorDirective \
	--disable bugprone-branch-clone \
	--disable bugprone-multi-level-implicit-pointer-conversion \
	--disable alpha.unix.PthreadLock \
	--disable cert-err33-c \
	--disable cert-err34-c \
	--disable clang-diagnostic-format-nonliteral \
	--ctu --skip ./test/code_checker/skipfile --output ./bin/code_checker/reports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant