sanity: soften the class.*{ check

* src/sanity/style.test: Allow { on the same line as "enum class".
This commit is contained in:
Alexandre Duret-Lutz 2015-09-07 22:52:39 +02:00
parent 767e0522c9
commit 6079b1dcdf

View file

@ -181,7 +181,7 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
$GREP 'namespace .*{' $tmp && $GREP 'namespace .*{' $tmp &&
diag 'Opening { should be on its own line.' diag 'Opening { should be on its own line.'
$GREP 'class .*{' $tmp && $GREP 'class .*{' $tmp | $GREP -v enum &&
diag 'Opening { should be on its own line.' diag 'Opening { should be on its own line.'
$GREP '( ' $tmp && $GREP '( ' $tmp &&
@ -244,7 +244,7 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
diag 'No useless parentheses after return.' diag 'No useless parentheses after return.'
$GREP 'NULL' $tmp && $GREP 'NULL' $tmp &&
diag 'Use 0 instead of NULL. NULL is not portable.' diag 'Use nullptr instead of NULL.'
# std::list::size() can be O(n). Better use empty() whenever # std::list::size() can be O(n). Better use empty() whenever
# possible, even for other containers. # possible, even for other containers.