summaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
index 4ab5627..1274001 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -100,6 +100,26 @@ if get_option('lint')
if autoship.found()
test('autoship', autoship, args: ['test', lilv_src_root], suite: 'data')
endif
+
+ # Check code with cppcheck
+ cppcheck = find_program('cppcheck', required: false)
+ if cppcheck.found()
+ compdb_path = join_paths(lilv_build_root, 'compile_commands.json')
+ suppress_path = join_paths(lilv_src_root, '.suppress.cppcheck')
+ test(
+ 'cppcheck',
+ cppcheck,
+ args: [
+ '--enable=warning,style,performance,portability',
+ '--error-exitcode=1',
+ '--project=' + compdb_path,
+ '--suppressions-list=' + suppress_path,
+ '-DLILV_VERSION="\"@0@\""'.format(meson.project_version()),
+ '-q',
+ ],
+ suite: 'code',
+ )
+ endif
endif
# Check licensing metadata