Ai
1 Star 0 Fork 0

wisejohn/c-coderdbc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
astyle-all.sh 672 Bytes
一键复制 编辑 原始数据 按行查看 历史
astand 提交于 2023-05-04 04:40 +08:00 . New release notes format, style config in file.
#!/bin/bash
OPTIONS="--options=conf/astylerc"
RETURN=0
ASTYLE='./astyle'
if [ $? -ne 0 ]; then
echo "[!] astyle not installed. Unable to check source file format policy." >&2
exit 1
fi
FILES=`find . | grep -P "^(.*\/src).*\.(c|cpp|h)$"`
for FILE in $FILES; do
# compare files
# $ASTYLE $OPTIONS < $FILE | cmp -s $FILE -
# if [ $? -ne 0 ]; then
# echo "[!] $FILE does not respect the agreed coding style." >&2
# RETURN=1
# fi
# forcibly format file
$ASTYLE $OPTIONS $FILE
# git add $FILE
echo $FILE
done
if [ $RETURN -eq 1 ]; then
echo "" >&2
echo "Make sure you have run astyle with the following options:" >&2
echo $OPTIONS >&2
fi
exit $RETURN
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wisejohn/c-coderdbc.git
git@gitee.com:wisejohn/c-coderdbc.git
wisejohn
c-coderdbc
c-coderdbc
ISSUE-28/add_more_info_on_generation

搜索帮助