Merge pull request #7683 from ethereum/add_while_style_rule

Add ``while (..)` to style checker
This commit is contained in:
chriseth 2019-11-11 17:41:25 +01:00 committed by GitHub
commit 24f41bc979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ bool StaticAnalyzer::visit(MemberAccess const& _memberAccess)
if (m_constructor)
{
auto const* expr = &_memberAccess.expression();
while(expr)
while (expr)
{
if (auto id = dynamic_cast<Identifier const*>(expr))
{

View File

@ -17,7 +17,7 @@ fi
FORMATERROR=$(
(
git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp' # no space after "if" or "for"
git grep -nIE "\<(if|for|while)\(" -- '*.h' '*.cpp' # no space after "if", "for" or "while"
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