Add `while (..) to style checker

This commit is contained in:
Mathias Baumann 2019-11-11 17:09:59 +01:00
parent 375be4a04d
commit e643c4ca28
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