diff options
author | David Robillard <d@drobilla.net> | 2024-10-06 13:25:46 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-10-06 13:28:29 -0400 |
commit | c23d46b4318432256e0ddee3b695034545d775dd (patch) | |
tree | f8201b4f5fb7aaecc9aafcd8ae1af8fe2575491b | |
parent | a634d85dc022abb8e02368ec96c55f77b3a32842 (diff) | |
download | sratom-c23d46b4318432256e0ddee3b695034545d775dd.tar.gz sratom-c23d46b4318432256e0ddee3b695034545d775dd.tar.bz2 sratom-c23d46b4318432256e0ddee3b695034545d775dd.zip |
Add lint option and fix warning_level abuse
-rw-r--r-- | meson_options.txt | 3 | ||||
-rw-r--r-- | test/meson.build | 20 |
2 files changed, 11 insertions, 12 deletions
diff --git a/meson_options.txt b/meson_options.txt index dbab79e..54544f6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,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 e31f1e5..36a3a6b 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,13 +1,13 @@ -# Copyright 2021-2022 David Robillard <d@drobilla.net> +# Copyright 2021-2024 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC -#################### -# Project Metadata # -#################### +######## +# Lint # +######## -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', sratom_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', sratom_src_root, 'lint'], - suite: 'data', - ) + reuse_args = ['--root', sratom_src_root, 'lint'] + test('REUSE', reuse, args: reuse_args, suite: 'data') endif endif |