Skip to content

Commit 1d935c0

Browse files
committed
static-test/vera++: reduce linelength false positives
1 parent 894de86 commit 1d935c0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dist/tools/vera++/check.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ if github_annotate_is_on; then
4949
DETAILS=$(echo "${line}" | cut -d: -f3- |
5050
sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
5151

52-
# parse if warning (errors don't have a label)
53-
if echo "$DETAILS" | grep -q "^warning: "; then
52+
if echo "$DETAILS" | grep -q "longer than 100 characters" &&
53+
[ -n "sed -n "${LINENUM}p" "$FILENAME" | sed -n '/\/\*\*</p'" ]
54+
then # ignore inline comments exceeding line length
55+
elif echo "$DETAILS" | grep -q "longer than 100 characters" &&
56+
[ -n "sed -n "${LINENUM}p" "${FILENAME}" | sed -n '/^\s*[*/].*https*:\/\//p'" ]
57+
then # ignore lines containing http:// or https:// exceeding line length
58+
elif echo "$DETAILS" | grep -q "^warning: "; then
59+
# parse if warning (errors don't have a label)
5460
DETAILS=$(echo "$DETAILS" | sed 's/^warning: //')
5561
github_annotate_warning "$FILENAME" "$LINENUM" "$DETAILS"
5662
else

0 commit comments

Comments
 (0)