Merge pull request #7684 from ethereum/add_while_style_rule

Add ``switch (..)` to style checker
This commit is contained in:
chriseth 2019-11-11 17:56:46 +01:00 committed by GitHub
commit 5423dd6a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 11 deletions

View File

@ -17,7 +17,7 @@ fi
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 "\<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