summaryrefslogtreecommitdiff
path: root/top
diff options
context:
space:
mode:
Diffstat (limited to 'top')
-rw-r--r--top/maint.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/top/maint.mk b/top/maint.mk
index e5a3782921..1f5bddd56a 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -996,6 +996,14 @@ sc_prohibit_undesirable_word_seq:
| grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
&& { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
+# Except for shell files and for loops, double semicolon is probably a mistake
+sc_prohibit_double_semicolon:
+ @prohibit='; *;[ {} \]*(/[/*]|$$)' \
+ in_vc_files='\.[chly]$$' \
+ exclude='\bfor *\(.*\)' \
+ halt="Double semicolon detected" \
+ $(_sc_search_regexp)
+
_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
# Using test's -a and -o operators is not portable.