scripts: cover .tsx in the tracker-tag and comment-block lints
This commit is contained in:
parent
44164d1a89
commit
79dc8ca615
2 changed files with 5 additions and 5 deletions
|
|
@ -8,7 +8,7 @@
|
|||
# exceeds MAX. Runs as its own CI job and IS a required check on the forge
|
||||
# (branch protection) — a hit blocks merge.
|
||||
#
|
||||
# Scope: tracked *.rs *.nix *.sh *.js *.ts *.css *.html. Markdown is exempt
|
||||
# Scope: tracked *.rs *.nix *.sh *.js *.ts *.tsx *.css *.html. Markdown is exempt
|
||||
# (it is prose by nature). Comment forms: `#` line comments (nix/sh), `//`
|
||||
# line comments (rs/js/ts), and `/* */` block comments (nix/rs/js/ts/css) +
|
||||
# `<!-- -->` (html). A blank line separates two line-comment blocks (does NOT
|
||||
|
|
@ -23,12 +23,12 @@ MAX=30
|
|||
# Collect annotations into a variable (not via xargs/awk exit codes) so a
|
||||
# hit in any xargs batch is preserved — mirrors scripts/check-issue-refs.sh.
|
||||
hits="$(
|
||||
git ls-files -z '*.rs' '*.nix' '*.sh' '*.js' '*.ts' '*.css' '*.html' \
|
||||
git ls-files -z '*.rs' '*.nix' '*.sh' '*.js' '*.ts' '*.tsx' '*.css' '*.html' \
|
||||
| xargs -0 -r awk -v MAX="$MAX" '
|
||||
function mode_of(fn) {
|
||||
if (fn ~ /\.nix$/) return "nix"
|
||||
if (fn ~ /\.sh$/) return "hash"
|
||||
if (fn ~ /\.(rs|js|ts)$/) return "slash"
|
||||
if (fn ~ /\.(rs|js|ts|tsx)$/) return "slash"
|
||||
if (fn ~ /\.css$/) return "cstyle"
|
||||
if (fn ~ /\.html$/) return "html"
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue