* src/sanity/style.test: Catch {.*{ and }.*}.
* src/sanity/80columns.test: Untabify files. * iface/gspn/ltlgspn.cc, src/ltlvisit/basereduc.cc: Fix long lines.
This commit is contained in:
parent
3426ece95c
commit
7eb5f3d81a
5 changed files with 131 additions and 106 deletions
|
|
@ -4,6 +4,18 @@
|
|||
|
||||
set -e
|
||||
|
||||
untabify()
|
||||
{
|
||||
perl -pe 's/^((.{8})*)\t/$1 /g;
|
||||
s/^(.(.{8})*)\t/$1 /g;
|
||||
s/^(..(.{8})*)\t/$1 /g;
|
||||
s/^(...(.{8})*)\t/$1 /g;
|
||||
s/^(....(.{8})*)\t/$1 /g;
|
||||
s/^(.....(.{8})*)\t/$1 /g;
|
||||
s/^(......(.{8})*)\t/$1 /g;
|
||||
s/^(.......(.{8})*)\t/$1 /g;' $1
|
||||
}
|
||||
|
||||
rm -f failures
|
||||
|
||||
for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
||||
|
|
@ -11,8 +23,8 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
|||
find "$dir" \( -name "${1-*}.hh" -o -name "${1-*}.cc" \
|
||||
-o -name "${1-*}.test" \) -a -type f -a -print |
|
||||
while read file; do
|
||||
x='.........................................'
|
||||
if grep -q $x$x "$file"; then
|
||||
x='........................................'
|
||||
if (untabify $file | grep -q $x.$x) 2>/dev/null; then
|
||||
if grep 'GNU Bison' "$file" >/dev/null ||
|
||||
grep 'generated by flex' "$file" >/dev/null ; then
|
||||
:
|
||||
|
|
|
|||
|
|
@ -98,6 +98,12 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
|||
grep -v 'for (;;)' $tmp | grep ';[^ ")]' &&
|
||||
diag 'Must have space or newline after semicolon.'
|
||||
|
||||
grep '}.*}' $tmp &&
|
||||
diag 'No two } on the same line.'
|
||||
|
||||
grep '{.*{' $tmp &&
|
||||
diag 'No two { on the same line.'
|
||||
|
||||
$fail && echo "$file" >>failures
|
||||
done
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue