summaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-10-06 13:39:24 -0400
committerDavid Robillard <d@drobilla.net>2024-10-11 14:04:30 -0400
commitce5688253e1ef06cd9551f563f70aab2cd487197 (patch)
tree1a65c85a1b1278b8807601859902a36b98105d62 /test/meson.build
parent5c2a9c1d745dcf4959347f0af53291149665ed13 (diff)
downloadsratom-ce5688253e1ef06cd9551f563f70aab2cd487197.tar.gz
sratom-ce5688253e1ef06cd9551f563f70aab2cd487197.tar.bz2
sratom-ce5688253e1ef06cd9551f563f70aab2cd487197.zip
Add cppcheck lint testHEADmaster
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 337f26d..1e8b08f 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -38,6 +38,20 @@ if get_option('lint')
if autoship.found()
test('autoship', autoship, args: ['test', sratom_src_root], suite: 'data')
endif
+
+ # Check code with cppcheck
+ cppcheck = find_program('cppcheck', required: false)
+ if cppcheck.found()
+ compdb_path = join_paths(sratom_build_root, 'compile_commands.json')
+ cppcheck_args = [
+ '--enable=warning,style,performance,portability',
+ '--error-exitcode=1',
+ '--project=' + compdb_path,
+ '--suppress=normalCheckLevelMaxBranches',
+ '-q',
+ ]
+ test('cppcheck', cppcheck, args: cppcheck_args, suite: 'code')
+ endif
endif
# Check licensing metadata