summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPiston.cpp3
-rwxr-xr-xsrc/CheckBasicStyle.lua4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 3bed01cc1..a6f247150 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -133,7 +133,8 @@ void cBlockPistonHandler::PushBlocks(
moveBlockPos.x, moveBlockPos.y, moveBlockPos.z
);
}
- } else
+ }
+ else
{
// Not breakable, just move it
a_World->SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, moveBlock, moveMeta);
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua
index 8d188bb67..6cd499fd1 100755
--- a/src/CheckBasicStyle.lua
+++ b/src/CheckBasicStyle.lua
@@ -203,6 +203,10 @@ local g_ViolationPatterns =
-- 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 *'"},
+
+ -- 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"},
}