Skip to content

Commit 129f7cf

Browse files
authored
Merge pull request #200 from Sichao25/yus/reformat
Specify version for clang-format and cmake-format
2 parents 9b1da22 + 3c140d9 commit 129f7cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/format-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ jobs:
2222
- name: Install clang-format
2323
run: |
2424
sudo apt-get update
25-
sudo apt-get install -y clang-format
25+
sudo apt-get install -y clang-format-18
2626
2727
- name: Install cmake-format
28-
run: pip install cmake-format PyYAML
28+
run: pip install PyYAML cmake-format==0.6.13
2929

3030
- name: Check C++ code format
3131
run: |
@@ -48,13 +48,13 @@ jobs:
4848
EXIT_CODE=0
4949
while read file; do
5050
if ! cmake-format --check "$file"; then
51-
echo "$file is not properly formatted"
51+
echo "$file is not properly formatted. Reformat with clang-format-18."
5252
echo "Run: cmake-format -i $file"
5353
EXIT_CODE=1
5454
fi
5555
done < <(find . -name "CMakeLists.txt" -o -name "*.cmake")
5656
if [ $EXIT_CODE -eq 1 ]; then
57-
echo "Some CMake files are not properly formatted"
57+
echo "Some CMake files are not properly formatted. Reformat with cmake-format 0.6.13."
5858
exit 1
5959
fi
6060
echo "All CMake files are properly formatted"

0 commit comments

Comments
 (0)