Merge branch 'testsuite-astyle-fixes'

Conflicts:
	.travis.yml

Closes #48
This commit is contained in:
Sam Dodrill 2015-02-20 11:12:46 -08:00
commit 88cd0168ad
2 changed files with 66 additions and 2 deletions

View File

@ -5,8 +5,8 @@ compiler:
before-install: before-install:
- sudo apt-get update - sudo apt-get update
install: install:
- sudo apt-get install build-essential libssl-dev flex bison - sudo apt-get install build-essential libssl-dev flex bison astyle
script: "./configure && make" script: "(cd ./testsuite/astyle && ./check_style.sh) ./configure && make"
notifications: notifications:
irc: "irc.yolo-swag.com#elemental-ircd" irc: "irc.yolo-swag.com#elemental-ircd"

64
testsuite/astyle/check_style.sh Executable file
View File

@ -0,0 +1,64 @@
#!/bin/bash -e
cd ../..
for file in $(find **/*.c)
do
if [[ $file = "bandb/sqlite3.c" ]]
then
continue
fi
if [[ $file = "src/lex.yy.c" ]]
then
continue
fi
if [[ $file = "src/y.tab.c" ]]
then
continue
fi
if [[ $file = "tools/convertilines.c" ]]
then
continue
fi
if [[ $file = "tools/convertklines.c" ]]
then
continue
fi
if [[ $file = "tools/mkpasswd.c" ]]
then
continue
fi
if [[ $file = "tools/viconf.c" ]]
then
continue
fi
if [[ $file = "unsupported/make_override_immune.c" ]]
then
continue
fi
if [[ $file = "unsupported/m_clearchan.c" ]]
then
continue
fi
if [[ $file = "unsupported/sno_channeljoin.c" ]]
then
continue
fi
if [[ $(astyle --style=linux --mode=c -n $file 2>&1 | cut -f1 -d' ') = "Unchanged" ]]
then
echo "$file passed coding standards"
else
echo "$file is not at coding standards."
exit 1
fi
done