Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/dev/clang-tidy-fixes-2026-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
- [PR #499](https://github.com/Framework-R-D/phlex/pull/499)
- [x] [bugprone-throwing-static-initialization](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/throwing-static-initialization.html) (7)
- [PR #472](https://github.com/Framework-R-D/phlex/pull/472)
- [ ] [bugprone-unchecked-optional-access](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unchecked-optional-access.html) (15)
- [x] [bugprone-unchecked-optional-access](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/unchecked-optional-access.html) (15)
- [PR #495](https://github.com/Framework-R-D/phlex/pull/495)
- [ ] [cert-dcl50-cpp](https://clang.llvm.org/extra/clang-tidy/checks/cert/dcl50-cpp.html) (2)
- [ ] [cert-err33-c](https://clang.llvm.org/extra/clang-tidy/checks/cert/err33-c.html) (4)
- [ ] [cert-msc30-c](https://clang.llvm.org/extra/clang-tidy/checks/cert/msc30-c.html) (6)
Expand Down
10 changes: 6 additions & 4 deletions plugins/python/src/modulewrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,11 +1182,13 @@
// translate and validate the output query
auto opq = validate_query(output);
if (!opq.has_value()) {
// validate_query will have set a python exception
// LCOV_EXCL_START
// validate_query _will_ have set a python exception with details about the
// error, so just propagate it as a C++ exception
std::string msg;
Comment thread
greenc-FNAL marked this conversation as resolved.
Outdated
if (msg_from_py_error(msg, false)) {
throw std::runtime_error("output specification error: " + msg);
}
msg_from_py_error(msg, false);
throw std::runtime_error("output specification error: " + msg);

Check warning on line 1190 in plugins/python/src/modulewrap.cpp

View check run for this annotation

Codecov / codecov/patch

plugins/python/src/modulewrap.cpp#L1189-L1190

Added lines #L1189 - L1190 were not covered by tests
// LCOV_EXCL_STOP
}

// insert provider node (TODO: as in transform and observe, we'll leak the
Expand Down
3 changes: 2 additions & 1 deletion test/form/form_basics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ TEST_CASE("form::experimental::config tests", "[form]")
cfg.addItem("prod1", "file1.root", 1);

auto item = cfg.findItem("prod1");
REQUIRE(item.has_value());
REQUIRE(item);
Comment thread
knoepfel marked this conversation as resolved.
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) -- `REQUIRE` protects against incorrect access
CHECK(item->product_name == "prod1");

CHECK_FALSE(cfg.findItem("nonexistent").has_value());
Expand Down
1 change: 1 addition & 0 deletions test/identifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ TEST_CASE("Identifier from JSON", "[identifier]")
boost::json::object parsed_json = boost::json::parse(R"( {"identifier": "b" } )").as_object();
auto b_from_json = phlex::detail::value_if_exists(parsed_json, "identifier");
REQUIRE(b_from_json);
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) -- `REQUIRE` protects against incorrect access
CHECK(b == *b_from_json);
}

Expand Down
Loading