Skip to content

Commit c9532ed

Browse files
authored
Update lint_xrefs.sh
1 parent 7f7e41d commit c9532ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/lint_xrefs.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ while IFS=: read -r filepath link; do
2323
status=1
2424
fi
2525
done < <(
26-
git --no-pager grep --no-color -I -o -E \
27-
'\[[^]]+\]\([^[:space:])]*/[^[:space:])]*\)|href="[^"]*/[^"]*"|src="[^"]*/[^"]*"' \
26+
git --no-pager grep --no-color -I -P -o \
27+
'(?!.*@lint-ignore)(?:\[[^]]+\]\([^[:space:])]*/[^[:space:])]*\)|href="[^"]*/[^"]*"|src="[^"]*/[^"]*")' \
2828
-- '*' \
2929
':(exclude).*' \
3030
':(exclude)**/.*' \
@@ -33,7 +33,6 @@ done < <(
3333
':(exclude)**/*.xml' \
3434
':(exclude,glob)**/third-party/**' \
3535
':(exclude,glob)**/third_party/**' \
36-
| grep -v '@lint-ignore' \
3736
| grep -Ev 'https?://' \
3837
| sed -E \
3938
-e 's#([^:]+):\[[^]]+\]\(([^)]+)\)#\1:\2#' \

0 commit comments

Comments
 (0)