summaryrefslogtreecommitdiffstats
path: root/src/CheckBasicStyle.lua
diff options
context:
space:
mode:
authortycho <tycho@localhost>2015-03-11 11:39:49 +0100
committertycho <tycho@localhost>2015-03-11 11:39:49 +0100
commit8646e95b6f91942e7741830dc057daa0e9a40aed (patch)
tree8802209f399b855bf2d13b08bfef0dea8cca0b74 /src/CheckBasicStyle.lua
parentFixed Sequence Generator for IntGen (diff)
downloadcuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar.gz
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar.bz2
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar.lz
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar.xz
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.tar.zst
cuberite-8646e95b6f91942e7741830dc057daa0e9a40aed.zip
Diffstat (limited to '')
-rw-r--r--src/CheckBasicStyle.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CheckBasicStyle.lua b/src/CheckBasicStyle.lua
index 648a5711b..16e34e321 100644
--- a/src/CheckBasicStyle.lua
+++ b/src/CheckBasicStyle.lua
@@ -101,9 +101,9 @@ local g_ViolationPatterns =
{"&&[^(]+!=", "Add parenthesis around comparison"},
{"!=[^)]+||", "Add parenthesis around comparison"},
{"||[^(]+!=", "Add parenthesis around comparison"},
- {"<[^)T][^)]*&&", "Add parenthesis around comparison"}, -- Must take special care of templates: "template <T> fn(Args && ...)"
- {"&&[^(]+<", "Add parenthesis around comparison"},
- {"<[^)T][^)]*||", "Add parenthesis around comparison"}, -- Must take special care of templates: "template <T> fn(Args && ...)"
+ {"<[^)>]*&&", "Add parenthesis around comparison"}, -- Must take special care of templates: "template <T> fn(Args && ...)"
+ -- Cannot check a < following a && due to functions of the form x fn(y&& a, z<b> c)
+ {"<[^)>]*||", "Add parenthesis around comparison"}, -- Must take special care of templates: "template <T> fn(Args && ...)"
{"||[^(]+<", "Add parenthesis around comparison"},
-- Cannot check ">" because of "obj->m_Flag &&". Check at least ">=":
{">=[^)]+&&", "Add parenthesis around comparison"},