sanity: soften the class.*{ check
* src/sanity/style.test: Allow { on the same line as "enum class".
This commit is contained in:
parent
767e0522c9
commit
6079b1dcdf
1 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue