aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--test/meson.build11
2 files changed, 12 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ec20e2f7..18a0d75f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -41,7 +41,7 @@ sanitize:
stage: build
image: lv2plugin/debian-x64-clang
script:
- - meson setup build -Db_lundef=false -Dbuildtype=plain -Dc_std=c11 -Ddocs=disabled -Dwarning_level=3 -Dwerror=true
+ - meson setup build -Db_lundef=false -Dbuildtype=plain -Dc_std=c11 -Ddocs=disabled -Dlint=true -Dwarning_level=3 -Dwerror=true
- ninja -C build test
variables:
CC: "clang"
diff --git a/test/meson.build b/test/meson.build
index 530c0d13..771158b1 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -61,6 +61,17 @@ if get_option('lint')
)
endif
+ # Check code formatting
+ clang_format = find_program('clang-format', required: false)
+ if clang_format.found()
+ test(
+ 'format',
+ clang_format,
+ args: ['--Werror', '--dry-run'] + c_headers + sources,
+ suite: 'code',
+ )
+ endif
+
# Check code with cppcheck
if not meson.is_subproject()
cppcheck = find_program('cppcheck', required: false)