We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6df0d31 commit 2f2d419Copy full SHA for 2f2d419
commands/format
@@ -18,10 +18,16 @@ fi
18
NO_RUN_IF_EMPTY=()
19
if [[ "$OSTYPE" != "darwin"* ]]; then NO_RUN_IF_EMPTY+=(--no-run-if-empty); fi
20
21
+if command -v clang-format-8 > /dev/null ; then
22
+ CLANG_FORMAT=clang-format-8
23
+else
24
+ CLANG_FORMAT=clang-format
25
+fi
26
+
27
for ROOT in provides internals ; do
28
find $ROOT -name '*.md' -print0 | xargs "${NO_RUN_IF_EMPTY[@]}" -0 prettier --write --
29
for SUFFIX in cpp hpp ; do
- find $ROOT -name "*.$SUFFIX" -print0 | xargs "${NO_RUN_IF_EMPTY[@]}" -0 clang-format -i --
30
+ find $ROOT -name "*.$SUFFIX" -print0 | xargs "${NO_RUN_IF_EMPTY[@]}" -0 $CLANG_FORMAT -i --
31
done
32
33
0 commit comments