Skip to content
24 changes: 8 additions & 16 deletions docs/dev/clang-tidy-fixes-2026-04.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this merge got mangled (removing the record of fixes already performed).

Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
- [PR #560](https://github.com/Framework-R-D/phlex/pull/560)
- [x] [cppcoreguidelines-use-default-member-init](https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/use-default-member-init.html) (5)
- [PR #556](https://github.com/Framework-R-D/phlex/pull/556)
- [x] [google-explicit-constructor](https://clang.llvm.org/extra/clang-tidy/checks/google/explicit-constructor.html) (38)
- _a.k.a._ [misc-explicit-constructor](https://clang.llvm.org/extra/clang-tidy/checks/misc/explicit-constructor.html) (`clang-tidy` >= 23.0.0)
- [PR #581](https://github.com/Framework-R-D/phlex/pull/581)
- [ ] [modernize-avoid-c-arrays](https://clang.llvm.org/extra/clang-tidy/checks/modernize/avoid-c-arrays.html) (17)
- [ ] [modernize-avoid-c-style-cast](https://clang.llvm.org/extra/clang-tidy/checks/modernize/avoid-c-style-cast.html) (82)
- [ ] [modernize-concat-nested-namespaces](https://clang.llvm.org/extra/clang-tidy/checks/modernize/concat-nested-namespaces.html) (1)
Expand All @@ -104,32 +101,27 @@
- [ ] [modernize-use-designated-initializers](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-designated-initializers.html) (69)
- [ ] [modernize-use-equals-default](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html) (7)
- [ ] [modernize-use-integer-sign-comparison](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-integer-sign-comparison.html) (7)
- [x] [modernize-use-nullptr](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-nullptr.html) (194)
- [PR #592](https://github.com/Framework-R-D/phlex/pull/592)
- [ ] [modernize-use-nullptr](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-nullptr.html) (194)
- [ ] [modernize-use-ranges](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-ranges.html) (5)
- [ ] [modernize-use-starts-ends-with](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-starts-ends-with.html) (6)
- [ ] [modernize-use-std-numbers](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-numbers.html) (2)
- [ ] [modernize-use-using](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-using.html) (3)
- [x] [performance-avoid-endl](https://clang.llvm.org/extra/clang-tidy/checks/performance/avoid-endl.html) (27)
- [PR #563](https://github.com/Framework-R-D/phlex/pull/563)
- [x] [performance-enum-size](https://clang.llvm.org/extra/clang-tidy/checks/performance/enum-size.html) (2)
- [PR #583](https://github.com/Framework-R-D/phlex/pull/583)
- [ ] [performance-enum-size](https://clang.llvm.org/extra/clang-tidy/checks/performance/enum-size.html) (2)
- [x] [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance/faster-string-find.html) (4)
- [PR #584](https://github.com/Framework-R-D/phlex/pull/584)
- [ ] [performance-inefficient-string-concatenation](https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-string-concatenation.html) (2)
- [x] [performance-inefficient-vector-operation](https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html) (1)
- [PR #586](https://github.com/Framework-R-D/phlex/pull/586)
- [x] [performance-inefficient-string-concatenation](https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-string-concatenation.html) (2)
- [PR #585](https://github.com/Framework-R-D/phlex/pull/585)
- [ ] [performance-inefficient-vector-operation](https://clang.llvm.org/extra/clang-tidy/checks/performance/inefficient-vector-operation.html) (1)
- [ ] [performance-move-const-arg](https://clang.llvm.org/extra/clang-tidy/checks/performance/move-const-arg.html) (1)
- [ ] [performance-no-automatic-move](https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html) (1)
- [x] [performance-no-int-to-ptr](https://clang.llvm.org/extra/clang-tidy/checks/performance/no-int-to-ptr.html) (15)
- [PR #564](https://github.com/Framework-R-D/phlex/pull/564)
- [x] [performance-type-promotion-in-math-fn](https://clang.llvm.org/extra/clang-tidy/checks/performance/type-promotion-in-math-fn.html) (2)
- Resolved incidentally by [PR #551](https://github.com/Framework-R-D/phlex/pull/551)
- [x] [performance-unnecessary-copy-initialization](https://clang.llvm.org/extra/clang-tidy/checks/performance/unnecessary-copy-initialization.html) (1)
- [PR #590](https://github.com/Framework-R-D/phlex/pull/590)
- [ ] [performance-type-promotion-in-math-fn](https://clang.llvm.org/extra/clang-tidy/checks/performance/type-promotion-in-math-fn.html) (2)
- [ ] [performance-unnecessary-copy-initialization](https://clang.llvm.org/extra/clang-tidy/checks/performance/unnecessary-copy-initialization.html) (1)
- [ ] [performance-unnecessary-value-param](https://clang.llvm.org/extra/clang-tidy/checks/performance/unnecessary-value-param.html) (44)
- [x] [portability-template-virtual-member-function](https://clang.llvm.org/extra/clang-tidy/checks/portability/template-virtual-member-function.html) (2)
- [PR #591](https://github.com/Framework-R-D/phlex/pull/591)
- [ ] [portability-template-virtual-member-function](https://clang.llvm.org/extra/clang-tidy/checks/portability/template-virtual-member-function.html) (2)
- [ ] [readability-avoid-const-params-in-decls](https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-const-params-in-decls.html) (7)
- [ ] [readability-braces-around-statements](https://clang.llvm.org/extra/clang-tidy/checks/readability/braces-around-statements.html) (74)
- [ ] [readability-const-return-type](https://clang.llvm.org/extra/clang-tidy/checks/readability/const-return-type.html) (1)
Expand Down
6 changes: 3 additions & 3 deletions phlex/core/framework_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include "phlex/core/edge_maker.hpp"
#include "phlex/model/product_store.hpp"

#include "fmt/std.h"
#include "spdlog/cfg/env.h"
#include "spdlog/spdlog.h"

#include <cassert>
#include <format>
#include <iostream>

namespace phlex::experimental {
Expand Down Expand Up @@ -120,8 +120,8 @@ namespace phlex::experimental {
make_edge(predicate->sender(), it->second.predicate_port());
continue;
}
throw std::runtime_error("A non-existent filter with the name '" + predicate_name +
"' was specified for " + name);
throw std::runtime_error(std::format(
"A non-existent filter with the name '{}' was specified for {}", predicate_name, name));
}
}
return result;
Expand Down
5 changes: 2 additions & 3 deletions plugins/python/src/pymodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ static void add_cmake_prefix_paths_to_syspath(char const* cmake_prefix_path)
// Build site-packages paths from each CMAKE_PREFIX_PATH token
while (std::getline(iss, path_entry, ':')) {
if (!path_entry.empty()) {
std::string version_str =
std::to_string(PY_MAJOR_VERSION) + "." + std::to_string(PY_MINOR_VERSION);
std::string site_packages = path_entry + "/lib/python" + version_str + "/site-packages";
std::string site_packages = path_entry + "/lib/python" + std::to_string(PY_MAJOR_VERSION) +
"." + std::to_string(PY_MINOR_VERSION) + "/site-packages";
site_package_paths.push_back(site_packages);
}
}
Expand Down
24 changes: 24 additions & 0 deletions test/framework_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "plugins/layer_generator.hpp"

#include "catch2/catch_test_macros.hpp"
#include "catch2/matchers/catch_matchers_string.hpp"

#include <stdexcept>

Expand Down Expand Up @@ -78,3 +79,26 @@ TEST_CASE("Stop driver when workflow throws exception", "[graph]")
CHECK(g.execution_count("throw_exception") == 0ull);
CHECK(g.execution_count("downstream_of_exception") == 0ull);
}

TEST_CASE("Throw when predicate specified by consumer does not exist", "[graph]")
{
experimental::layer_generator gen;
gen.add_layer("event", {"job", 1, 1});

experimental::framework_graph g{driver_for_test(gen)};
g.provide(
"provide_num",
[](data_cell_index const& id) -> unsigned int { return id.number(); },
concurrency::unlimited)
.output_product("input", "num", "event");

g.observe(
"observe_num", [](unsigned int const) {}, concurrency::unlimited)
.input_family(product_query{.creator = "input", .layer = "event", .suffix = "num"})
.experimental_when("missing_predicate");

CHECK_THROWS_WITH(
g.execute(),
Catch::Matchers::ContainsSubstring(
"A non-existent filter with the name 'missing_predicate' was specified for observe_num"));
}
Loading