diff options
author | David Robillard <d@drobilla.net> | 2024-06-22 18:46:19 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-22 18:59:26 -0400 |
commit | aad5574b4d52f0f02ed1ec3d8f1e12227176a98e (patch) | |
tree | f7439857e05904e78f8b1012c48c5a313e4788d8 /test | |
parent | d29acfa029c0a0dd0e8167b88f15549c67c410e8 (diff) | |
download | zix-aad5574b4d52f0f02ed1ec3d8f1e12227176a98e.tar.gz zix-aad5574b4d52f0f02ed1ec3d8f1e12227176a98e.tar.bz2 zix-aad5574b4d52f0f02ed1ec3d8f1e12227176a98e.zip |
Fix whitespace and add code formatting test
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/meson.build b/test/meson.build index 15f449c..2ef815e 100644 --- a/test/meson.build +++ b/test/meson.build @@ -23,6 +23,17 @@ if not meson.is_subproject() and get_option('lint') suite: 'data', ) endif + + # Check code formatting + clang_format = find_program('clang-format', required: false) + if clang_format.found() + test( + 'format', + clang_format, + args: ['--Werror', '--dry-run'] + c_headers + sources, + suite: 'code', + ) + endif endif # Set warning suppression flags specific to tests @@ -103,7 +114,7 @@ foreach test, cases : sequential_tests endforeach endforeach -# Test multi-threaded +# Test multi-threaded if thread_dep.found() foreach test, cases : threaded_tests sources = common_test_sources + files('test_@0@.c'.format(test)) |