forked from Tencent/ncnn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeformat.sh
More file actions
executable file
·11 lines (8 loc) · 836 Bytes
/
codeformat.sh
File metadata and controls
executable file
·11 lines (8 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
# we run clang-format and astyle twice to get stable format output
find src/ tools/ tests/ examples/ benchmark/ python/ -type f -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' | grep -v python/pybind11 | xargs -i clang-format -i {}
astyle -n -r "benchmark/*.h,*.cpp,*.cc" "src/*.h,*.cpp,*.cc" "tests/*.h,*.cpp,*.cc" "tools/*.h,*.cpp,*.cc" "examples/*.h,*.cpp,*.cc"
astyle -n -r "python/*.h,*.cpp,*.cc" --exclude=python/pybind11
find src/ tools/ tests/ examples/ benchmark/ python/ -type f -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' | grep -v python/pybind11 | xargs -i clang-format -i {}
astyle -n -r "benchmark/*.h,*.cpp,*.cc" "src/*.h,*.cpp,*.cc" "tests/*.h,*.cpp,*.cc" "tools/*.h,*.cpp,*.cc" "examples/*.h,*.cpp,*.cc"
astyle -n -r "python/*.h,*.cpp,*.cc" --exclude=python/pybind11