Hi all,
check_GNU_style.sh complains a lot about dg-* directives in the testsuite and
in particular about line lengths.
There's nothing we can do about the directives and sometimes they're supposed
to be long, in particular the scan-assembler
checks in dg-final. Currently check_GNU_style.sh has code to avoid warning for
dg-* directives but it's too weak, it doesn't
catch dg-final or dg-options directives.
This patch makes the code ignore all "{ dg-.*" lines for length purposes.
This eliminates a lot of false positives in my patches and didn't filter any
legitimate warnings in my patches.
Ok for trunk?
Thanks,
Kyrill
2016-10-11 Kyrylo Tkachov <[email protected]>
* check_GNU_style.sh (col): Ignore dg-XXX directives for line length
complaints.
commit d0685da3487fc4cc614c64851185fed5c350bb7b
Author: Kyrylo Tkachov <[email protected]>
Date: Tue Oct 11 11:33:50 2016 +0100
[check_GNU_style.sh] More aggressively ignore dg-xxx directives
diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index 87a276c..ed4e07f 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -178,7 +178,7 @@ col (){
cat "$tmp" \
| sed 's/^[0-9]*:+//' \
| expand \
- | awk '$0 !~ /{[[:space:]]*dg-(error|warning|message)[[:space:]]/ { \
+ | awk '$0 !~ /{[[:space:]]*dg-[^[:space:]]+[[:space:]]/ { \
if (length($0) > 80) \
printf "%s\033[1;31m%s\033[0m\n", \
substr($0,1,80), \