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

Add cppcheck target and call it on CI #309

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Add cppcheck target and call it on CI #309

merged 1 commit into from
Mar 17, 2025

Conversation

dantti
Copy link
Member

@dantti dantti commented Mar 17, 2025

It requires
CMAKE_EXPORT_COMPILE_COMMANDS=ON
which is enabled on base preset.

@dantti
Copy link
Member Author

dantti commented Mar 17, 2025

@dfaure @iamsergio clazy is not WError, but cppcheck is should I make it just report the issues? I think with this we can retire our CI builders for it

@iamsergio
Copy link
Contributor

@dfaure @iamsergio clazy is not WError, but cppcheck is should I make it just report the issues? I think with this we can retire our CI builders for it

Clazy is Werror already actually.

cppcheck should just report the errors (so CI passes), until someone curates the cppcheck warning list.

you can pass -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF --target cppcheck

@dantti
Copy link
Member Author

dantti commented Mar 17, 2025

then CMAKE_COMPILE_WARNING_AS_ERROR is not working as I said, you can see it reached cppcheck while there were several warnings in clazy first.

It requires
CMAKE_EXPORT_COMPILE_COMMANDS=ON
which is enabled on base preset.
@iamsergio
Copy link
Contributor

then CMAKE_COMPILE_WARNING_AS_ERROR is not working as I said, you can see it reached cppcheck while there were several warnings in clazy first.

Can you double-check ? I don't see the clazy warnings, note that the -Wdocumentation spam doesn't come from clazy and we have a Wno-error=documentation for that

@dantti
Copy link
Member Author

dantti commented Mar 17, 2025

ok, deprecated-declarations seemed valid but maybe too much work that might be better done on Qt5 support is dropped.
Then this PR should be fine now, and I can clean our CI

Copy link
Contributor

@iamsergio iamsergio left a comment

Choose a reason for hiding this comment

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

CMakeLists.txt:        add_compile_options(-Wno-error=deprecated-declarations)
CMakeLists.txt:            add_compile_options(-Wno-error=documentation -Wno-error=unused-private-field -Wno-error=c++20-extensions)

yeah deprecated-declarations also ignored

@dantti dantti merged commit 46b89ee into master Mar 17, 2025
27 checks passed
@dantti dantti deleted the dantti/cppcheck branch March 17, 2025 11:33
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