summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--doc/patchage.14
-rw-r--r--lint/meson.build47
-rw-r--r--meson.build45
-rw-r--r--meson_options.txt6
-rw-r--r--src/AlsaDriver.cpp1
-rw-r--r--src/Canvas.cpp4
-rw-r--r--src/Configuration.cpp6
-rw-r--r--src/Configuration.hpp1
-rw-r--r--src/Patchage.cpp1
-rw-r--r--src/TextViewLog.cpp2
-rw-r--r--src/Widget.hpp2
12 files changed, 62 insertions, 61 deletions
diff --git a/.gitignore b/.gitignore
index c41acb9..7e7ff9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# Copyright 2020-2025 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
-build/
+/build/
diff --git a/doc/patchage.1 b/doc/patchage.1
index 85c59d5..b1654ee 100644
--- a/doc/patchage.1
+++ b/doc/patchage.1
@@ -1,8 +1,8 @@
.\" # Copyright 2010-2022 David Robillard <d@drobilla.net>
.\" # SPDX-License-Identifier: CC-BY-SA-4.0 or GPL-3.0-or-later
-.Dd Nov 30, 2022
+.Dd November 30, 2022
.Dt PATCHAGE 1
-.Os Patchage 1.0.11
+.Os
.Sh NAME
.Nm patchage
.Nd graphically connect JACK/ALSA audio/MIDI applications
diff --git a/lint/meson.build b/lint/meson.build
new file mode 100644
index 0000000..48e736d
--- /dev/null
+++ b/lint/meson.build
@@ -0,0 +1,47 @@
+# Copyright 2020-2024 David Robillard <d@drobilla.net>
+# SPDX-License-Identifier: 0BSD OR GPL-3.0-or-later
+
+if not meson.is_subproject()
+ # Check release metadata
+ autoship = find_program('autoship', required: false)
+ if autoship.found()
+ test(
+ 'autoship',
+ autoship,
+ args: ['test', patchage_src_root],
+ suite: 'data',
+ )
+ endif
+
+ # Check code with cppcheck
+ cppcheck = find_program('cppcheck', required: false)
+ if cppcheck.found()
+ compdb_path = join_paths(patchage_build_root, 'compile_commands.json')
+ suppress_path = join_paths(patchage_src_root, '.suppress.cppcheck')
+ test(
+ 'cppcheck',
+ cppcheck,
+ args: [
+ '--enable=warning,style,performance,portability',
+ '--error-exitcode=1',
+ '--project=' + compdb_path,
+ '--suppressions-list=' + suppress_path,
+ '-DPATCHAGE_DISABLE_FMT_WARNINGS=',
+ '-q',
+ ],
+ suite: 'code',
+ timeout: 60,
+ )
+ endif
+endif
+
+# Check licensing metadata
+reuse = find_program('reuse', required: false)
+if reuse.found()
+ test(
+ 'REUSE',
+ reuse,
+ args: ['--root', patchage_src_root, 'lint'],
+ suite: 'data',
+ )
+endif
diff --git a/meson.build b/meson.build
index 6eb66ca..9b4b6f2 100644
--- a/meson.build
+++ b/meson.build
@@ -180,7 +180,6 @@ gtkmm_dep = dependency(
ganv_dep = dependency(
'ganv-1',
- fallback: ['ganv', 'ganv_dep'],
include_type: 'system',
version: '>= 1.8.2',
)
@@ -316,49 +315,7 @@ install_man(files('doc/patchage.1'))
#########
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', patchage_src_root],
- suite: 'data',
- )
- endif
-
- # Check code with cppcheck
- cppcheck = find_program('cppcheck', required: false)
- if cppcheck.found()
- compdb_path = join_paths(patchage_build_root, 'compile_commands.json')
- suppress_path = join_paths(patchage_src_root, '.suppress.cppcheck')
- test(
- 'cppcheck',
- cppcheck,
- args: [
- '--enable=warning,style,performance,portability',
- '--error-exitcode=1',
- '--project=' + compdb_path,
- '--suppressions-list=' + suppress_path,
- '-q',
- ],
- suite: 'code',
- timeout: 60,
- )
- endif
- endif
-
- # Check licensing metadata
- reuse = find_program('reuse', required: false)
- if reuse.found()
- test(
- 'REUSE',
- reuse,
- args: ['--root', patchage_src_root, 'lint'],
- suite: 'data',
- )
- endif
+ subdir('lint')
endif
if not meson.is_subproject()
diff --git a/meson_options.txt b/meson_options.txt
index be37ed4..56d585b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,11 +16,5 @@ option('jack_dbus', type: 'feature', yield: true,
option('lint', type: 'boolean', value: false, yield: true,
description: 'Run code quality checks')
-option('strict', type: 'boolean', value: false, yield: true,
- description: 'Enable ultra-strict warnings')
-
-option('tests', type: 'feature', yield: true,
- description: 'Build tests')
-
option('title', type: 'string', value: 'Patchage',
description: 'Project title')
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index 8424adf..d320135 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -29,6 +29,7 @@ PATCHAGE_RESTORE_WARNINGS
#include <memory>
#include <optional>
#include <set>
+#include <string>
#include <utility>
#include <variant>
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index 80b5993..ae8c51d 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -146,8 +146,8 @@ Canvas::create_port(Configuration& conf,
Coord loc;
if (!conf.get_module_location(client_name, module_type, loc)) {
// No position saved, come up with a pseudo-random one
- loc.x = static_cast<double>(20 + _rng() % 640);
- loc.y = static_cast<double>(20 + _rng() % 480);
+ loc.x = static_cast<double>(20 + (_rng() % 640));
+ loc.y = static_cast<double>(20 + (_rng() % 480));
conf.set_module_location(client_name, module_type, loc);
}
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 752b5f5..f77f825 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -17,8 +17,6 @@
#include <utility>
#include <vector>
-// IWYU pragma: no_include <algorithm>
-
namespace patchage {
namespace {
@@ -295,6 +293,8 @@ Configuration::load()
file.close();
}
+namespace {
+
inline void
write_module_position(std::ofstream& os,
const std::string& name,
@@ -305,6 +305,8 @@ write_module_position(std::ofstream& os,
<< " " << type << " " << loc.x << " " << loc.y << "\n";
}
+} // namespace
+
void
Configuration::save()
{
diff --git a/src/Configuration.hpp b/src/Configuration.hpp
index ffaee6e..59039fc 100644
--- a/src/Configuration.hpp
+++ b/src/Configuration.hpp
@@ -13,6 +13,7 @@
#include <optional>
#include <string>
#include <tuple>
+#include <utility>
#include <variant>
namespace patchage {
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index 56ee5f8..349fbf0 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -24,7 +24,6 @@
#include "event_to_string.hpp"
#include "handle_event.hpp"
#include "i18n.hpp"
-#include "patchage_config.h" // IWYU pragma: keep
#include "warnings.hpp"
PATCHAGE_DISABLE_GANV_WARNINGS
diff --git a/src/TextViewLog.cpp b/src/TextViewLog.cpp
index ba7c512..ad20c37 100644
--- a/src/TextViewLog.cpp
+++ b/src/TextViewLog.cpp
@@ -76,7 +76,7 @@ TextViewLog::min_height() const
int line_height = 0;
_text_view->get_line_yrange(buffer->begin(), y, line_height);
- return line_height + 2 * _text_view->get_pixels_inside_wrap();
+ return line_height + (2 * _text_view->get_pixels_inside_wrap());
}
} // namespace patchage
diff --git a/src/Widget.hpp b/src/Widget.hpp
index 1c3b6ee..0f813da 100644
--- a/src/Widget.hpp
+++ b/src/Widget.hpp
@@ -5,7 +5,7 @@
#define PATCHAGE_WIDGET_HPP
#include <glibmm/refptr.h>
-#include <gtkmm/builder.h> // IWYU pragma: keep
+#include <gtkmm/builder.h>
#include <string>