summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorDhanuka <csx@tuta.io>2021-03-10 15:40:40 +0000
committerDaiki Ueno <ueno@gnu.org>2021-03-10 15:40:40 +0000
commitda9637edee86f8d55491e9c8e841eeaf01ccd12f (patch)
tree15e604416d1390c1807636b2e7c82d370ba50d75 /.gitlab-ci.yml
parent1178020c2ad4ab7bbc7ee5320eff6043c0ce8711 (diff)
downloadlibsecret-da9637edee86f8d55491e9c8e841eeaf01ccd12f.tar.gz
Enable static analyzer in CI
These changes enable clang-analyzer and cppcheck static analyzers. Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/issues/51
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4bed3df..bdc64ac 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,7 @@ stages:
variables:
DEPENDENCIES: dbus-x11 diffutils gcc gjs meson ninja-build python3-dbus python3-gobject redhat-rpm-config
+ CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --template='{id}:{file}:{line},{severity},{message}'"
fedora:Werror:
image: fedora:latest
@@ -59,6 +60,24 @@ fedora:ubsan:
paths:
- _build/meson-logs/testlog.txt
+fedora-static-analyzers/test:
+ image: fedora:latest
+ stage: build
+ before_script:
+ - dnf upgrade -y
+ - dnf install -y 'dnf-command(builddep)'
+ - dnf builddep -y libsecret
+ - dnf install -y $DEPENDENCIES clang-analyzer cppcheck
+ - dbus-uuidgen --ensure
+ script:
+ - meson _build
+ - meson compile -C _build --ninja-args scan-build
+ - cppcheck --force -q $CPPCHECK_OPTIONS libsecret/ egg/ tool/
+ artifacts:
+ when: on_failure
+ paths:
+ - _build/meson-logs/testlog.txt
+
fedora:coverage:
image: fedora:latest
stage: build