]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: fix sc_long_lines to warn about 100+ maximum line length again
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 2 Jan 2016 23:18:58 +0000 (00:18 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sat, 2 Jan 2016 23:18:58 +0000 (00:18 +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

diff --git a/cfg.mk b/cfg.mk
index 441d78911ed0b607f28ce6b355ac067b92efbab2..df22823bea179bbf3e2f78ec5b1976b840ed0435 100644 (file)
--- 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}.' |                          \