Add `switch (..) to style checker

This commit is contained in:
Mathias Baumann 2019-11-11 17:09:59 +01:00
parent 24f41bc979
commit e35a23bbcc
9 changed files with 11 additions and 11 deletions

View File

@ -17,7 +17,7 @@ fi
FORMATERROR=$( FORMATERROR=$(
( (
git grep -nIE "\<(if|for|while)\(" -- '*.h' '*.cpp' # no space after "if", "for" or "while" git grep -nIE "\<(if|for|while|switch)\(" -- '*.h' '*.cpp' # no space after "if", "for", "while" or "switch"
git grep -nIE "\<for\>\s*\([^=]*\>\s:\s.*\)" -- '*.h' '*.cpp' # no space before range based for-loop git grep -nIE "\<for\>\s*\([^=]*\>\s:\s.*\)" -- '*.h' '*.cpp' # no space before range based for-loop
git grep -nIE "\<if\>\s*\(.*\)\s*\{\s*$" -- '*.h' '*.cpp' # "{\n" on same line as "if" / "for" git grep -nIE "\<if\>\s*\(.*\)\s*\{\s*$" -- '*.h' '*.cpp' # "{\n" on same line as "if" / "for"
git grep -nIE "[,\(<]\s*const " -- '*.h' '*.cpp' # const on left side of type git grep -nIE "[,\(<]\s*const " -- '*.h' '*.cpp' # const on left side of type