mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds a test to check_style.sh to check for spaces before colon (:) in range based for loops.
This commit is contained in:
committed by
chriseth
parent
3b0284817e
commit
7b3aba81fb
@@ -18,6 +18,7 @@ fi
|
||||
FORMATERROR=$(
|
||||
(
|
||||
git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp' # no space after "if" or "for"
|
||||
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
|
||||
git grep -nIE "^\s*(static)?\s*const " -- '*.h' '*.cpp' # const on left side of type (beginning of line)
|
||||
|
||||
Reference in New Issue
Block a user