StyleCheck: Add "else has to be on a separate line" (#3412)
This commit is contained in:
parent
f8f0dc4558
commit
502b5ec732
@ -133,7 +133,8 @@ void cBlockPistonHandler::PushBlocks(
|
|||||||
moveBlockPos.x, moveBlockPos.y, moveBlockPos.z
|
moveBlockPos.x, moveBlockPos.y, moveBlockPos.z
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Not breakable, just move it
|
// Not breakable, just move it
|
||||||
a_World->SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, moveBlock, moveMeta);
|
a_World->SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, moveBlock, moveMeta);
|
||||||
|
@ -203,6 +203,10 @@ local g_ViolationPatterns =
|
|||||||
-- We don't like "Type const *" and "Type const &". Use "const Type *" and "const Type &" instead:
|
-- We don't like "Type const *" and "Type const &". Use "const Type *" and "const Type &" instead:
|
||||||
{"const %&", "Use 'const Type &' instead of 'Type const &'"},
|
{"const %&", "Use 'const Type &' instead of 'Type const &'"},
|
||||||
{"const %*", "Use 'const Type *' instead of 'Type const *'"},
|
{"const %*", "Use 'const Type *' instead of 'Type const *'"},
|
||||||
|
|
||||||
|
-- Check if "else" is on the same line as a brace.
|
||||||
|
{"}%s*else", "else has to be on a separate line"},
|
||||||
|
{"else%s*{", "else has to be on a separate line"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user