coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: fix sc_long_lines to warn about 100+ maximum line length


From: Bernhard Voelker
Subject: [PATCH] maint: fix sc_long_lines to warn about 100+ maximum line length again
Date: Sun, 3 Jan 2016 00:20:12 +0100

Since commit v8.23-60-g414a8cf, the above check failed to find sources
where the length of the longest line is a 3 or more digit number.

* cfg.mk (sc_long_lines): Remove the '\' escape character before '{'
and '}', because this would mean literal '{' and '}' characters in
an extended regular expression in sed(1).
---
 cfg.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 441d789..df22823 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -321,7 +321,7 @@ sc_long_lines:
        sed -r 1q /dev/null 2>/dev/null                                 \
           || { echo "$@: skipping: sed -r not supported"; exit 0; };   \
        files=$$($(VC_LIST_EXCEPT) | xargs wc -L | sed -rn '/ total$$/d;\
-                 s/^ *(8[1-9]|9[0-9]|[0-9]\{3,\}) //p');               \
+                 s/^ *(8[1-9]|9[0-9]|[0-9]{3,}) //p');                 \
        halt='line(s) with more than 80 characters; reindent';          \
        for file in $$files; do                                         \
          expand $$file | grep -nE '^.{80}.' |                          \
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]