3 Star 6 Fork 0

Gitee 极速下载 / freeablo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/wheybags/freeablo/
克隆/下载
clang_format_script.sh 724 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"
FMT_COMMAND=clang-format-7
$FMT_COMMAND -version
paths="apps components test"
for x in $paths; do
find $x -name *.h -o -name *.cpp | xargs $FMT_COMMAND -i -style=file
done
if [ ! -z "$TRAVIS" ]; then
DIFF_FILE=/tmp/fa_format_diff.patch
git diff > $DIFF_FILE
if [ -s $DIFF_FILE ]; then
DIFF_URL=$(cat "$DIFF_FILE" | nc termbin.com 9999 | tr -d '\0')
echo -e "\e[31m" # red
echo "Autoformat needed, to apply the formatting changes locally, run:"
echo "curl $DIFF_URL > $DIFF_FILE && git apply $DIFF_FILE"
echo -e "\e[0m" # end red
exit 1
fi
fi
exit 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/freeablo.git
git@gitee.com:mirrors/freeablo.git
mirrors
freeablo
freeablo
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891