aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-09-29 11:11:54 -0400
committerDavid Robillard <d@drobilla.net>2024-10-12 11:10:39 -0400
commit5f6e04cdee0a1d0a43b0f0d2ddee5f176a0af264 (patch)
tree087a5dcdc76da124f68b75805b5a649e756f088d
parentea10d696d6490eb7317b64f3bee0d8d8d0ca8362 (diff)
downloadjalv-5f6e04cdee0a1d0a43b0f0d2ddee5f176a0af264.tar.gz
jalv-5f6e04cdee0a1d0a43b0f0d2ddee5f176a0af264.tar.bz2
jalv-5f6e04cdee0a1d0a43b0f0d2ddee5f176a0af264.zip
Fix whitespace and add clang-format test
-rw-r--r--meson.build20
-rw-r--r--src/jalv_qt.cpp2
-rw-r--r--test/meson.build44
3 files changed, 54 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index dc3b206..83cc36d 100644
--- a/meson.build
+++ b/meson.build
@@ -275,18 +275,18 @@ endif
# Programs #
############
-sources = (
- backend_sources + files(
- 'src/control.c',
- 'src/jalv.c',
- 'src/log.c',
- 'src/lv2_evbuf.c',
- 'src/state.c',
- 'src/symap.c',
- 'src/worker.c',
- )
+common_sources = files(
+ 'src/control.c',
+ 'src/jalv.c',
+ 'src/log.c',
+ 'src/lv2_evbuf.c',
+ 'src/state.c',
+ 'src/symap.c',
+ 'src/worker.c',
)
+sources = backend_sources + common_sources
+
common_dependencies = [
backend_dep,
lilv_dep,
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp
index 54af169..acfbcdb 100644
--- a/src/jalv_qt.cpp
+++ b/src/jalv_qt.cpp
@@ -197,7 +197,7 @@ FlowLayout::sizeHint() const
QSize
FlowLayout::minimumSize() const
{
- QSize size = {};
+ QSize size = {};
for (QLayoutItem* const item : itemList) {
size = size.expandedTo(item->minimumSize());
}
diff --git a/test/meson.build b/test/meson.build
index d7d0e94..43083cf 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,6 +1,37 @@
-# Copyright 2019-2022 David Robillard <d@drobilla.net>
+# Copyright 2019-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
+########
+# Lint #
+########
+
+all_sources = (
+ common_sources + files(
+ '../src/attributes.h',
+ '../src/backend.h',
+ '../src/control.h',
+ '../src/frontend.h',
+ '../src/jack.c',
+ '../src/jalv_config.h',
+ '../src/jalv_console.c',
+ '../src/jalv_gtk.c',
+ '../src/jalv_internal.h',
+ '../src/jalv_qt.cpp',
+ '../src/jalv_qt.hpp',
+ '../src/log.h',
+ '../src/lv2_evbuf.h',
+ '../src/nodes.h',
+ '../src/options.h',
+ '../src/port.h',
+ '../src/portaudio.c',
+ '../src/state.h',
+ '../src/symap.h',
+ '../src/types.h',
+ '../src/urids.h',
+ '../src/worker.h',
+ )
+)
+
if get_option('lint')
if not meson.is_subproject()
# Check release metadata
@@ -25,6 +56,17 @@ if 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'] + all_sources,
+ suite: 'code',
+ )
+ endif
endif
##############