Skip to content

Commit 182922f

Browse files
authored
ci: re-enable clang-format check in build workflow (#38)
Fix clang-format in build #2
1 parent d9f8864 commit 182922f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,12 @@ jobs:
104104
ruff format --check .
105105
106106
- name: Lint with clang-format
107-
if: false # TODO(#2): fix this then re-enable
108107
run: |
109108
# Install and run C++ linter
110109
echo -e "\n##### Installing and running clang-format linter #####"
111-
sudo apt-get update && sudo apt-get install -y clang-format
112-
clang-format --version
113-
find src -name '*.cpp' -o -name '*.h' | xargs clang-format --dry-run --Werror
110+
sudo apt-get update && sudo apt-get install -y clang-format-18
111+
clang-format-18 --version
112+
find src -name '*.cpp' -o -name '*.h' | xargs clang-format-18 --dry-run --Werror
114113
115114
lint-license:
116115
runs-on: ubuntu-latest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,16 @@ You can prompt your coding tool to "create a comprehensive test plan for X, cove
100100
* **C++ Format:** To apply automated fixes, run:
101101

102102
```bash
103-
# install clang-format
104-
sudo apt-get update && sudo apt-get install -y clang-format
103+
# install clang-format-18
104+
sudo apt-get update && sudo apt-get install -y clang-format-18
105105
106106
# format all C++ files
107-
find src -name '*.cpp' -o -name '*.h' | xargs clang-format -i
107+
find src -name '*.cpp' -o -name '*.h' | xargs clang-format-18 -i
108108
```
109109

110110
* **C++ Lint:** Check for style violations, run:
111111
```bash
112-
find src -name '*.cpp' -o -name '*.h' | xargs clang-format --dry-run --Werror
112+
find src -name '*.cpp' -o -name '*.h' | xargs clang-format-18 --dry-run --Werror
113113
```
114114

115115
* **Test:** To run all tests (Python and C++), run:

0 commit comments

Comments
 (0)