diff options
-rw-r--r-- | .reuse/dep5 | 5 | ||||
-rw-r--r-- | .suppress.cppcheck | 12 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | test/meson.build | 20 |
5 files changed, 40 insertions, 1 deletions
diff --git a/.reuse/dep5 b/.reuse/dep5 index f9693c0..73b8cb6 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -13,6 +13,11 @@ Copyright: 2020 David Robillard <d@drobilla.net> Comment: Contributed to the Commons as a tool configuration License: 0BSD OR ISC +Files: .suppress.cppcheck +Copyright: 2024 David Robillard <d@drobilla.net> +Comment: Contributed to the Commons as a tool configuration +License: 0BSD OR ISC + Files: bindings/test/*.ttl.in test/*/*.ttl.in test/lv2/core.lv2/*.ttl Copyright: 2015-2022 David Robillard <d@drobilla.net> License: ISC diff --git a/.suppress.cppcheck b/.suppress.cppcheck new file mode 100644 index 0000000..a239f27 --- /dev/null +++ b/.suppress.cppcheck @@ -0,0 +1,12 @@ +CastIntegerToAddressAtReturn +assignmentInAssert +constParameterPointer +constVariablePointer +knownConditionTrueFalse +memleakOnRealloc +noExplicitConstructor +normalCheckLevelMaxBranches +nullPointerArithmeticRedundantCheck +redundantInitialization +unusedStructMember +varFuncNullUB @@ -1,10 +1,11 @@ lilv (0.24.25) unstable; urgency=medium + * Add lint option with project metadata and code quality tests * Fix C++ test build on MacOS * Fix library current_version on MacOS * Fix test suite when TMPDIR has no trailing slash - -- David Robillard <d@drobilla.net> Sat, 16 Mar 2024 13:51:02 +0000 + -- David Robillard <d@drobilla.net> Sun, 06 Oct 2024 18:20:31 +0000 lilv (0.24.24) stable; urgency=medium diff --git a/meson.build b/meson.build index 6a9b52a..d34b422 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,7 @@ project( ) lilv_src_root = meson.current_source_dir() +lilv_build_root = meson.current_build_dir() major_version = meson.project_version().split('.')[0] version_suffix = '-@0@'.format(major_version) versioned_name = 'lilv' + version_suffix 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 |