diff options
Diffstat (limited to 'tests/lint/meson.build')
-rw-r--r-- | tests/lint/meson.build | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/lint/meson.build b/tests/lint/meson.build new file mode 100644 index 00000000..c641cbaa --- /dev/null +++ b/tests/lint/meson.build @@ -0,0 +1,24 @@ +# Copyright 2019-2024 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later + +if not meson.is_subproject() + # Check code with cppcheck + cppcheck = find_program('cppcheck', required: false) + if cppcheck.found() + compdb_path = join_paths(ingen_build_root, 'compile_commands.json') + suppress_path = join_paths(ingen_src_root, '.suppress.cppcheck') + test( + 'cppcheck', + cppcheck, + args: [ + '--cppcheck-build-dir=' + meson.current_build_dir(), + '--enable=warning,style,performance,portability', + '--error-exitcode=1', + '--project=' + compdb_path, + '--suppressions-list=' + suppress_path, + '-q', + ], + suite: 'code', + ) + endif +endif |