Skip to content

CI: Fail on cppcheck.sh error#4119

Open
hdiethelm wants to merge 2 commits into
LinuxCNC:masterfrom
hdiethelm:cppcheck_fail
Open

CI: Fail on cppcheck.sh error#4119
hdiethelm wants to merge 2 commits into
LinuxCNC:masterfrom
hdiethelm:cppcheck_fail

Conversation

@hdiethelm
Copy link
Copy Markdown
Contributor

@hdiethelm hdiethelm commented Jun 3, 2026

Fix issue in cppcheck.sh and make CI fail on cppcheck error

Additionally, make shellckeck.sh failing except for files that need yet to be fixed.

@hdiethelm
Copy link
Copy Markdown
Contributor Author

@hdiethelm
Copy link
Copy Markdown
Contributor Author

Still failing but the CI doesn't build my code but probably the one it would get after merge. The failing line doesn't look like this in my branch:
https://github.com/hdiethelm/linuxcnc-fork/blob/cppcheck_fail/src/hal/drivers/mesa-hostmot2/hm2_eth.c#L532

@BsAtHome That is what I was talking about in the other thread. Now the CI fails when there are cppcheck issues, so you dont't have to complain any more, the CI does it for you. There was a bug in cppcheck.sh

This can only be merged after the issue in #4111 got fixed and merged, otherwise the CI on master will fail.

Let's see if I can easily add a warn only list to shellcheck.sh. You can remove it as soon as all issues are fixed.

@hdiethelm
Copy link
Copy Markdown
Contributor Author

And the shellcheck warn/error variant.
I just wanted to test if it works. If you think it's useless, I can revert this commit before merge.

This now generates CI errors except for the following files:

./scripts/rip-environment.in \
./scripts/realtime.in \
./scripts/linuxcnc_info.in \
./docs/src/asciideps \
./debian/update-dch-from-git \

This will help against creping in issues in other shell scripts and as soon as these files are fixed, you can remove the code again or also just remove the files from the list.

@hdiethelm hdiethelm force-pushed the cppcheck_fail branch 2 times, most recently from 712df2c to 18d2dd0 Compare June 3, 2026 19:13
@hdiethelm
Copy link
Copy Markdown
Contributor Author

And after some mocking around with the github ci there is even a nice annotation:
grafik

@hdiethelm
Copy link
Copy Markdown
Contributor Author

^Rebased back to master

Comment thread scripts/cppcheck.sh Outdated
Comment thread scripts/shellcheck.sh Outdated
Comment thread scripts/shellcheck.sh Outdated
Fix issue in cppcheck.sh
So if one fails, you have still the result from the other
@hdiethelm hdiethelm marked this pull request as ready for review June 3, 2026 21:02
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