Skip to content

Cppcheck analysis limit. #4446

Closed
Closed
@fjpanag

Description

@fjpanag

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions