* iface/gspn/common.cc, iface/gspn/common.hh,
src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh, src/ltlparse/fmterror.cc, src/ltlparse/public.hh, src/ltlvisit/dotty.cc, src/ltlvisit/dotty.hh, src/ltlvisit/dump.cc, src/ltlvisit/dump.hh, src/ltlvisit/tostring.cc, src/ltlvisit/tostring.hh, src/misc/escape.cc, src/misc/escape.hh, src/tgba/bdddict.cc, src/tgba/bdddict.hh, src/tgba/bddprint.cc, src/tgba/bddprint.hh, src/tgbaalgos/dotty.cc, src/tgbaalgos/dotty.hh, src/tgbaalgos/lbtt.cc, src/tgbaalgos/lbtt.hh, src/tgbaalgos/neverclaim.cc, src/tgbaalgos/neverclaim.hh, src/tgbaalgos/save.cc, src/tgbaalgos/save.hh, src/tgbaalgos/gtec/status.cc, src/tgbaalgos/gtec/status.hh, src/tgbaparse/fmterror.cc, src/tgbaparse/public.hh: Include <iosfwd> in headers, and prefer <ostream> in the body whenever possible. * src/sanity/style.test, HACKING: Check and document this.
This commit is contained in:
parent
6853977be2
commit
ad96e8fbad
33 changed files with 85 additions and 39 deletions
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#! /bin/sh
|
||||
|
||||
# Ensure consistent style by catching common improper constructs.
|
||||
|
|
@ -113,9 +114,21 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
|
|||
grep -e 'return[ ]*[(][^(]*[)];' $tmp &&
|
||||
diag 'No useless parentheses after return.'
|
||||
|
||||
grep 'NULL' $tmp &&
|
||||
grep 'NULL' $tmp &&
|
||||
diag 'Use 0 instead of NULL. NULL is not portable.'
|
||||
|
||||
case $file in
|
||||
*.hh | *.hxx)
|
||||
if grep -e '(cout|cerr|clog)' $tmp >/dev/null; then
|
||||
:
|
||||
else
|
||||
grep '#.*include.*<iostream>' $tmp &&
|
||||
diag 'Avoid <iostream> in headers, better use <iosfwd>.'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
$fail && echo "$file" >>failures
|
||||
done
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue