Skip to content

Commit 7310fa4

Browse files
committed
Merge branch 'ps/gitlab-ci-static-analysis' into ps/gitlab-ci-macos
* ps/gitlab-ci-static-analysis: ci: add job performing static analysis on GitLab CI
2 parents a26002b + cd69c63 commit 7310fa4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.gitlab-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ test:
5151
paths:
5252
- t/failed-test-artifacts
5353
when: on_failure
54+
55+
static-analysis:
56+
image: ubuntu:22.04
57+
variables:
58+
jobname: StaticAnalysis
59+
before_script:
60+
- ./ci/install-docker-dependencies.sh
61+
script:
62+
- ./ci/run-static-analysis.sh
63+
- ./ci/check-directional-formatting.bash

ci/install-docker-dependencies.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ linux-musl)
2121
apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \
2222
bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null
2323
;;
24-
linux-*)
24+
linux-*|StaticAnalysis)
2525
# Required so that apt doesn't wait for user input on certain packages.
2626
export DEBIAN_FRONTEND=noninteractive
2727

@@ -31,6 +31,11 @@ linux-*)
3131
perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl \
3232
libdbd-sqlite3-perl libio-socket-ssl-perl libnet-smtp-ssl-perl ${CC_PACKAGE:-${CC:-gcc}} \
3333
apache2 cvs cvsps gnupg libcgi-pm-perl subversion
34+
35+
if test "$jobname" = StaticAnalysis
36+
then
37+
apt install -q -y coccinelle
38+
fi
3439
;;
3540
pedantic)
3641
dnf -yq update >/dev/null &&

0 commit comments

Comments
 (0)