diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2019-11-17 09:37:16 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2019-11-17 11:51:39 -0600 |
commit | d17b315b51eab12a68ff7eb21811cf07e3c398b9 (patch) | |
tree | d13b2e3015a3a7abf7d8524d3199ffa87e0c7cd6 /.gitlab-ci.yml | |
parent | 564f38ccd5ba8fc12fbe79aa4b9d0ee46ad93005 (diff) | |
download | epiphany-d17b315b51eab12a68ff7eb21811cf07e3c398b9.tar.gz |
Adjust cppcheck output
Using --template=gcc allows us to see error IDs so that we can suppress
false positives.
Also, add a bunch of suppressions for warnings that cppcheck is bad at
handling. Sadly, the most important warnings, like null pointer
dereference, are prone to many false positives, making them impractical
for us to use.
We also suppress warnings about non-casted NULL pointers at the end of a
variadic argument list. This is undefined behavior -- to avoid UB, we
should use (char *)NULL instead -- but glib depends on it and nothing
will work if this isn't allowed, so we had better ignore.
Finally, --enable=all should be equivalent to --enable=warning,style
with two extra classes of warnings, both of which we don't want.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 476b592b4..d24d894d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,8 +19,21 @@ cppcheck: allow_failure: true before_script: - apk update && apk add cppcheck - script: - - cppcheck --enable=all --suppress=variableScope --suppress=unusedFunction --force -q . --error-exitcode=1 --library=gtk + script: >- + cppcheck . + --enable=warning,style + --error-exitcode=1 + --library=gtk + --quiet + --suppress=ctunullpointer + --suppress=leakNoVarFunctionCall + --suppress=literalWithCharPtrCompare + --suppress=memleak + --suppress=redundantAssignment + --suppress=variableScope + --suppress=varFuncNullUB + --suppress=*:lib/contrib/gvdb/* + --template=gcc variables: BUNDLE: 'epiphany-git.flatpak' |