[Git][NTPsec/ntpsec][master] .gitlab-ci.yml: run cppcheck against the configured build
Matt Selsky (@selsky)
gitlab at mg.gitlab.com
Mon Oct 26 21:55:47 UTC 2026
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
2e900388 by Matt Selsky at 2026-10-23T08:39:33+00:00
.gitlab-ci.yml: run cppcheck against the configured build
cppcheck reported syntax errors in libntp/emalloc.c and in the Unity
test framework, along with other false positives, because no config.h
existed: the job never ran ./waf configure, and cppcheck guessed at #ifdef
combinations, some of which leave macros such as EREALLOC_IMPL and
UNITY_EXEC_TIME_START() without a usable definition.
Run ./waf configure first, add build/main to the include path so
config.h is found, and pass --max-configs=1 so that only the configured
build is analyzed. Also skip vendored tests/unity and libjsmn
directories.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -512,7 +512,8 @@ code-quality-c:
stage: test
image: $IMAGE_REGISTRY/quality-checks
script:
- - cppcheck --xml --enable=warning,style,performance,portability -I include -i libaes_siv -i attic -i build . 2> cppcheck-report.xml
+ - python3 ./waf configure --disable-doc --disable-manpage --refclock=all
+ - cppcheck --xml --enable=warning,style,performance,portability --max-configs=1 -I build/main -I include -i libaes_siv -i attic -i build -i tests/unity -i libjsmn . 2> cppcheck-report.xml
- cppcheck-codequality --input-file cppcheck-report.xml --output-file gl-code-quality-c.json
artifacts:
reports:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/2e9003888c3af5e72e4ee205e40f119c4e4e27cf
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/2e9003888c3af5e72e4ee205e40f119c4e4e27cf
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20261026/5eddb135/attachment.htm>
More information about the vc
mailing list