From a0fc1aef1fe9065ecabff51647aab036db244959 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Oct 2024 14:03:12 -0400 Subject: Add lint option and fix warning_level abuse --- meson_options.txt | 3 +++ test/meson.build | 12 ++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index 2ec1d7f..a8cec45 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -16,6 +16,9 @@ option('docs', type: 'feature', yield: true, option('html', type: 'feature', yield: true, description: 'Build paginated HTML documentation') +option('lint', type: 'boolean', value: false, yield: true, + description: 'Run code quality checks') + option('singlehtml', type: 'feature', yield: true, description: 'Build single-page HTML documentation') diff --git a/test/meson.build b/test/meson.build index d305dad..1815846 100644 --- a/test/meson.build +++ b/test/meson.build @@ -5,9 +5,9 @@ # Project Metadata # #################### -if get_option('warning_level') == 'everything' - # Check release metadata +if get_option('lint') if not meson.is_subproject() + # Check release metadata autoship = find_program('autoship', required: false) if autoship.found() test('autoship', autoship, args: ['test', lilv_src_root], suite: 'data') @@ -17,12 +17,8 @@ if get_option('warning_level') == 'everything' # Check licensing metadata reuse = find_program('reuse', required: false) if reuse.found() - test( - 'REUSE', - reuse, - args: ['--root', lilv_src_root, 'lint'], - suite: 'data', - ) + reuse_args = ['--root', lilv_src_root, 'lint'] + test('REUSE', reuse, args: reuse_args, suite: 'data') endif endif -- cgit v1.2.1