aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-09-29 19:23:42 -0400
committerDavid Robillard <d@drobilla.net>2024-10-12 14:07:10 -0400
commit54563d41caf66556978e6ffd37738126499c6e90 (patch)
treec1346a07835e36c9cde53a6da3fa30e28e3bd7c7 /test
parent18d6eb5850c7c34d5b6b05034b7392115931684d (diff)
downloadjalv-54563d41caf66556978e6ffd37738126499c6e90.tar.gz
jalv-54563d41caf66556978e6ffd37738126499c6e90.tar.bz2
jalv-54563d41caf66556978e6ffd37738126499c6e90.zip
Add cppcheck test
Diffstat (limited to 'test')
-rw-r--r--test/meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 43083cf..951d4a1 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -44,6 +44,26 @@ if get_option('lint')
suite: 'data',
)
endif
+
+ # Check code with cppcheck
+ cppcheck = find_program('cppcheck', required: false)
+ if cppcheck.found()
+ compdb_path = join_paths(jalv_build_root, 'compile_commands.json')
+ suppress_path = join_paths(jalv_src_root, '.suppress.cppcheck')
+ test(
+ 'cppcheck',
+ cppcheck,
+ args: [
+ '--enable=warning,style,performance,portability',
+ '--error-exitcode=1',
+ '--project=' + compdb_path,
+ '--suppressions-list=' + suppress_path,
+ '-q',
+ ['-i', jalv_build_root],
+ ],
+ suite: 'code',
+ )
+ endif
endif
# Check licensing metadata