Skip to content

Commit

Permalink
Merge pull request #50 from markspec/12_format_test
Browse files Browse the repository at this point in the history
Add clang format check to workflows.
  • Loading branch information
BrianMichell authored Jul 31, 2024
2 parents 937d17b + 20b6ccd commit c127871
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: "18"
check-path: "mdio"
17 changes: 8 additions & 9 deletions mdio/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,14 @@ class Variable {
mdio::SliceDescriptor err;
std::apply(
[&](const auto&... desc) {
size_t idx = 0;
((
[&] {
if (idx == preconditionStatus) {
err = desc;
}
idx++;
}()
), ...);
size_t idx = 0;
(([&] {
if (idx == preconditionStatus) {
err = desc;
}
idx++;
}()),
...);
},
tuple_descs);
return absl::InvalidArgumentError(
Expand Down

0 comments on commit c127871

Please sign in to comment.