Skip to content

Commit

Permalink
Add lint step for ambiguous list literals
Browse files Browse the repository at this point in the history
The "much greater/less than" unicode characters that look like list literals, I've made this mistake a few times... Lint would catch this early.

Co-authored-by: Simon Pieters <zcorpan@gmail.com>
  • Loading branch information
noamr and zcorpan authored Dec 23, 2021
1 parent 3320e88 commit 33ad837
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions resources.whatwg.org/build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ MATCHES=$(
grep -niE '\s+$' "$INPUT_FILE" | perl -lpe 'print "\nTrailing whitespace:" if $. == 1'
grep $'\t' "$INPUT_FILE" | perl -lpe 'print "\nTab:" if $. == 1'
grep $'\xc2\xa0' "$INPUT_FILE" | perl -lpe 'print "\nUnescaped nonbreaking space:" if $. == 1'
grep $'[\u226a\u226b]' "$INPUT_FILE" | perl -lpe 'print "\nWrong list literals, use \uAB\uBB instead:" if $. == 1'
)
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
Expand Down

0 comments on commit 33ad837

Please sign in to comment.