diff options
author | Colomban Wendling <[email protected]> | 2023-11-14 21:32:57 +0100 |
---|---|---|
committer | Colomban Wendling <[email protected]> | 2025-03-12 09:45:10 +0100 |
commit | ab21c38cfcc721aa20575c267a14b083db64b5a2 (patch) | |
tree | 99a411479d7ce6111bad81f38efed72ffa4d9a56 | |
parent | 1aac7f7fedb8f49afd264ddb43289a0700c5df17 (diff) | |
download | mate-panel-ab21c38cfcc721aa20575c267a14b083db64b5a2.tar.bz2 mate-panel-ab21c38cfcc721aa20575c267a14b083db64b5a2.tar.xz |
github-actions: Improve cppcheck accuracy
Give it relevant -D/-I flags so it can perform more useful checks.
This makes if slower, but hopefully more accurate and useful.
-rw-r--r-- | .github/workflows/build.yml | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17ace93b..ef38961a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -231,5 +231,37 @@ jobs: sudo apt-get install --assume-yes --no-install-recommends \ cppcheck ${DEB_LIBRARY_DEPS} ${DEB_LIBRARY_DEPS_MATE_DESKTOP} + # - define relevant configuration I can think of + # - X11-related stuff + # - Wayland-related stuff + # - in-process for Wayland + # - optional features + # - -I flags from pkg-config (grepped from configure.ac) + # - ignore non-source directories - name: cppcheck - run: cppcheck --enable=warning,style,performance,portability,information,missingInclude -i'gtk-layer-shell-build' . + env: + checks: warning,style,performance,portability,information,missingInclude + defines: > + -DHAVE_X11 -DHAVE_RANDR + -DHAVE_WAYLAND + -DCLOCK_INPROCESS -DFISH_INPROCESS -DNOTIFICATION_AREA_INPROCESS -DWNCKLET_INPROCESS + -DHAVE_WINDOW_PREVIEWS + -DHAVE_LANGINFO_H -DHAVE_NL_LANGINFO + -DGETTEXT_PACKAGE="mate-panel" + packages: > + gdk-pixbuf-2.0 + gio-unix-2.0 + gmodule-2.0 + gtk+-3.0 + ice + libwnck-3.0 + mate-desktop-2.0 + sm + run: | + cppcheck --enable="$checks" \ + -j $JOBS \ + $defines \ + $(pkg-config --cflags-only-I $packages) \ + -i gtk-layer-shell-build \ + -i mate-panel/mate-submodules/ \ + . |