diff --git a/scripts/check-comment-blocks.sh b/scripts/check-comment-blocks.sh index 28b0abd5..8aafe6b6 100755 --- a/scripts/check-comment-blocks.sh +++ b/scripts/check-comment-blocks.sh @@ -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 "" diff --git a/scripts/check-issue-refs.sh b/scripts/check-issue-refs.sh index 66aa1fbf..73254b51 100755 --- a/scripts/check-issue-refs.sh +++ b/scripts/check-issue-refs.sh @@ -8,7 +8,7 @@ # 0 otherwise. It runs as its own CI job and IS a required check on the # forge (branch protection) — a hit blocks merge. # -# Scope: tracked *.rs *.nix *.js *.ts *.css *.html. Markdown is exempt +# Scope: tracked *.rs *.nix *.js *.ts *.tsx *.css *.html. Markdown is exempt # (prose docs may legitimately cite the tracker). The pattern matches a # hash, 2-5 digits, then a non-alphanumeric char or end-of-line. A real # tracker tag is never glued to a letter, so the trailing class skips @@ -31,7 +31,7 @@ pattern='#[0-9]{2,5}([^0-9a-zA-Z]|$)' # and an empty file list. Lines carrying the `lint:allow` marker are # dropped (legitimate non-tracker `#`; see the header). hits="$( - git ls-files -z '*.rs' '*.nix' '*.js' '*.ts' '*.css' '*.html' \ + git ls-files -z '*.rs' '*.nix' '*.js' '*.ts' '*.tsx' '*.css' '*.html' \ | xargs -0 -r grep -nE "$pattern" /dev/null 2>/dev/null \ | grep -v 'lint:allow' || true )"