summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/maint.mk b/maint.mk
index df6b7f3a6..5ba7b286c 100644
--- a/maint.mk
+++ b/maint.mk
@@ -483,6 +483,14 @@ sc_proper_name_utf8_requires_ICONV:
exit 1; } || :; \
fi
+# Warn about "c0nst struct Foo const foo[]",
+# but not about "char const *const foo" or "#define const const".
+sc_redundant_const:
+ @grep -E '\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
+ $$($(VC_LIST_EXCEPT)) && \
+ { echo 1>&2 '$(ME): redundant "const" in declarations'; \
+ exit 1; } || :
+
sc_const_long_option:
@grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
| grep -Ev 'const struct option|struct option const' && { \