Skip to content

Suppress cppcheck exceptions #606

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

Merged
merged 2 commits into from
May 8, 2025
Merged

Conversation

yngve793
Copy link
Contributor

The objective is to run cppcheck during rebase testing. Adding suppress comments such that the codebase can pass without error or warning flags being raised.

Copy link
Contributor

@achaikou achaikou left a comment

Choose a reason for hiding this comment

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

Currently cppcheck already passes on main, while it does not pass on your local machine.
We suspect this is due to clang compiler being used? So can the first commit in this PR change our CI such that errors you bypass are reproducible there?

Also: current suppressions in the code mostly have explanations to them as to why they are suppressed, not fixed. Could we do the same?

@yngve793 yngve793 force-pushed the fix/ccpcheck_old_code branch from e4a0ffe to e75ab51 Compare March 26, 2025 14:06
Copy link
Contributor Author

@yngve793 yngve793 left a comment

Choose a reason for hiding this comment

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

Added a commit with job that runs analyzers on mac. It is not clear how to fix the issues.

@yngve793 yngve793 force-pushed the fix/ccpcheck_old_code branch 2 times, most recently from 9ed7f65 to 007c75b Compare March 27, 2025 14:17
Copy link
Contributor

@achaikou achaikou left a comment

Choose a reason for hiding this comment

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

Good. Now I see what has failed. We actually can fix most of them!

@yngve793 yngve793 force-pushed the fix/ccpcheck_old_code branch from 007c75b to b500a83 Compare March 28, 2025 11:11
Copy link
Contributor Author

@yngve793 yngve793 left a comment

Choose a reason for hiding this comment

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

Updated analyzers workflow as suggested.
Added code suggestions to remove mac cpp-checks.

@yngve793 yngve793 closed this Apr 9, 2025
@yngve793 yngve793 reopened this Apr 9, 2025
Copy link
Contributor

@achaikou achaikou left a comment

Choose a reason for hiding this comment

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

As we agreed to not turn on cppcheck on tests, then I am happy with this PR - rebase and merge at will 🐱

@yngve793 yngve793 force-pushed the fix/ccpcheck_old_code branch from b500a83 to 6ad9ad0 Compare May 7, 2025 15:04
@yngve793 yngve793 force-pushed the fix/ccpcheck_old_code branch from 6ad9ad0 to 13f0be1 Compare May 7, 2025 15:14
@yngve793 yngve793 merged commit 7da142a into equinor:main May 8, 2025
31 checks passed
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.

2 participants