summaryrefslogtreecommitdiffstats
path: root/test/meson.build
diff options
context:
space:
mode:
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