Skip to content

Commit d900c6d

Browse files
committed
install clang-format automatically
1 parent eaee803 commit d900c6d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pinyin in, English out: <br/>
9090

9191
## 格式化代码
9292

93-
- `brew install clang-format`
9493
- `sh format-code.sh`
9594

9695
## CI build

format-code.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# brew install clang-format
1+
if ! [ -x "$(command -v clang-format)" ]; then
2+
echo 'Error: clang-format is not installed.'
3+
brew install clang-format
4+
fi
25

36
ls src/*.* | xargs clang-format -i
47
ls Tests/*.* | xargs clang-format -i

0 commit comments

Comments
 (0)