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 buffered file only #3983

Merged

Conversation

dgeorge83616
Copy link
Contributor

@dgeorge83616 dgeorge83616 commented Nov 15, 2021

Cppcheck can take a long time to check a large project and has --file-filter option to check only the files in the project that match the filter. The PR adds logic to check only the file in the buffer.

Cppcheck isn't designed to work on header files without being included in the c/cc/cpp file. This PR also addresses that issue by skipping --project option and adding --suppress for discovered false positive, unusedStructMember.

Cppcheck recently added --file-filter so that cppcheck only checks the
filtered files, even when using --project option, which checks all files
in the project, by default. The --ccpcheck-build-dir option didn't help
enough (at all?).
Also fixed and assumed typo: foo.c, instead of foo.cpp
Attempt to fix the windows platform test execution.
Cppcheck isn't designed to check header files, stand-alone. Daniel
Marjamäki suggested using --suppress options to avoid FPs.
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks.

@hsanson hsanson merged commit aee0cc4 into dense-analysis:master Nov 18, 2021
@dgeorge83616 dgeorge83616 deleted the cppcheck_buffered_file_only branch November 18, 2021 17:16
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

Successfully merging this pull request may close these issues.

None yet

3 participants