From 8a549e492bd7e6a92858f224a53919574ac199f4 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 17:42:10 -0700 Subject: [PATCH 1/7] .cppcheck_suppress: fix exclusion of fmt headers in cppcheck analysis --- .cppcheck_suppress | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cppcheck_suppress b/.cppcheck_suppress index fc80470..40c9e86 100644 --- a/.cppcheck_suppress +++ b/.cppcheck_suppress @@ -35,7 +35,7 @@ missingInclude *:*CLI11.hpp *:*json.hpp *:*boost_unordered.hpp -*:fmt/*.h +*:*fmt/*.h # Problem caused by external files toomanyconfigs # More problems caused by external files -- with too many ifdefs From bd69d5d053cb773b6f6cbd40bab40fea5a326537 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 17:42:47 -0700 Subject: [PATCH 2/7] src/contaminant_set.hcpp: updated iwyu --- src/contaminant_set.cpp | 1 - src/contaminant_set.hpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/contaminant_set.cpp b/src/contaminant_set.cpp index 64126d7..859a0e1 100644 --- a/src/contaminant_set.cpp +++ b/src/contaminant_set.cpp @@ -11,7 +11,6 @@ #include #include #include -#include // for std::get #include #include diff --git a/src/contaminant_set.hpp b/src/contaminant_set.hpp index bd38475..8da93ac 100644 --- a/src/contaminant_set.hpp +++ b/src/contaminant_set.hpp @@ -5,7 +5,6 @@ #include #include -#include // for std::pair #include #include #include From ae8a30d44453ea50bfacd148156cf4761e9a2b96 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 17:44:34 -0700 Subject: [PATCH 3/7] src/tile_processor.cpp src/report.cpp src/html.cpp: fixing includes --- src/html.cpp | 5 ++--- src/report.cpp | 5 +++-- src/tile_processor.cpp | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/html.cpp b/src/html.cpp index 3333cd1..b34324c 100644 --- a/src/html.cpp +++ b/src/html.cpp @@ -29,7 +29,6 @@ #include #include #include -#include // for std::get probably in fmt #include // for pair #include @@ -371,8 +370,8 @@ basic_stats_html(const file_info &info, [[nodiscard]] auto tile_html(const tile_processor::tiles_centered_t ¢ered, - const std::vector &groups, const file_grades &grades) - -> std::string { + const std::vector &groups, + const file_grades &grades) -> std::string { static constexpr auto label = "tile"; static constexpr auto n_quants = 20.0; // ADS: ??? (-10: red, 0: light blue, +10: dark blue) diff --git a/src/report.cpp b/src/report.cpp index 96149bf..438f5d1 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -209,8 +210,8 @@ basic_stats_report(const file_info &info, [[nodiscard]] auto tile_report(const tile_processor::tiles_centered_t ¢ered, - const std::vector &groups, const file_grades &grades) - -> std::string { + const std::vector &groups, + const file_grades &grades) -> std::string { static constexpr auto label = "tile"; static constexpr auto max_precision{std::numeric_limits::digits10}; static constexpr auto start_tag = ">>Per tile sequence quality\t{}\n"; diff --git a/src/tile_processor.cpp b/src/tile_processor.cpp index 995ef35..7378450 100644 --- a/src/tile_processor.cpp +++ b/src/tile_processor.cpp @@ -26,7 +26,6 @@ #include #include #include -#include // for std::get #include #include From 5d7f779e3629b324d1229e9ea3d5c309909ea20f Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 17:44:53 -0700 Subject: [PATCH 4/7] src/falco_analyzer.cpp: iwyu --- src/falco_analyzer.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/falco_analyzer.cpp b/src/falco_analyzer.cpp index 1938fac..fa66d41 100644 --- a/src/falco_analyzer.cpp +++ b/src/falco_analyzer.cpp @@ -20,7 +20,6 @@ #include #include #include -#include // for std::get (iwyu fp) #include #include #include From c21ca3a2193d574e7de1271dea508742fd080c3f Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 18:54:15 -0700 Subject: [PATCH 5/7] src/falco.cpp: fixing some clang-tidy stuff that appears on macos --- src/falco.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/falco.cpp b/src/falco.cpp index 14fe9b3..e0a4c3f 100644 --- a/src/falco.cpp +++ b/src/falco.cpp @@ -345,17 +345,19 @@ main(int argc, char *argv[]) { argv = app.ensure_utf8(argv); app.usage( std::format("Usage: {} [options] -o OUTDIR INFILES", PROJECT_NAME)); + // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks) if (argc >= 2) app.footer(std::format(description, falco::get_share_dir())); + // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) // clang-format off // NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers) app.get_formatter()->long_option_alignment_ratio(0.2); app.set_help_flag("-h,--help", "Print more detailed help"); - // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) app.set_version_flag("--version", VERSION, "Print program version"); - app.add_flag("--license", [&](auto) { - std::print("{}", license_text); throw CLI::Success(); }, + app.add_flag("--license", + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) + [&](auto) { std::print("{}", license_text); throw CLI::Success(); }, "Print full license") ->callback_priority(CLI::CallbackPriority::PreRequirementsCheck); auto infiles_opt = From 908431160325ec3d83994b36a6025e38f4c43a83 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 19:12:45 -0700 Subject: [PATCH 6/7] .clang-tidy: allowing structs to have non-private members under broader checks --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index be97404..e85eff3 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -39,6 +39,7 @@ CheckOptions: cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: 'true' cppcoreguidelines-avoid-magic-numbers.IgnoredIntegerValues: '1;2;3;4;10' cppcoreguidelines-avoid-magic-numbers.IgnoredFloatingPointValues: '1.0;2.0;10.0;100.0' + misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: true google-readability-braces-around-statements.ShortStatementLines: '1' google-readability-namespace-comments.ShortNamespaceLines: '10' google-readability-namespace-comments.SpacesBeforeComments: '2' From 858858eceedf31c65b77b9c4ba84909502505333 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 30 Sep 2026 19:13:50 -0700 Subject: [PATCH 7/7] src/bgzf_reader.cpp: replacing dangerous std::memcpy with std::copy_n --- src/bgzf_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bgzf_reader.cpp b/src/bgzf_reader.cpp index a23f34e..eed3cc9 100644 --- a/src/bgzf_reader.cpp +++ b/src/bgzf_reader.cpp @@ -61,7 +61,7 @@ bgzf_reader::read_data() -> bool { if (at_eof()) return false; const auto unused_in = std::distance(next_in, end_in); - std::memcpy(inbuf.get(), next_in, unused_in); + std::copy_n(next_in, unused_in, inbuf.get()); next_in = inbuf.get(); // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) end_in = next_in + unused_in;