Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
hooks:
- id: check-added-large-files
exclude: |
(?x)^(.*cubin.cpp | .*cubin.h)$
(?x)^(.*cubin.cpp | .*cubin.h | ATTRIBUTIONS-.*\.md)$
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
Expand Down Expand Up @@ -66,7 +66,7 @@ repos:
additional_dependencies:
- tomli
# add ignore words list
args: ["-L", "Mor,ans,thirdparty", "--skip", "security_scanning/*"]
args: ["-L", "Mor,ans,thirdparty", "--skip", "ATTRIBUTIONS-*.md,*.svg", "--skip", "security_scanning/*"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

Script executed:

#!/bin/bash
# First, let's inspect the .pre-commit-config.yaml file to see lines around 21 and 69
echo "=== Inspecting .pre-commit-config.yaml ==="
if [ -f ".pre-commit-config.yaml" ]; then
  echo "--- Lines 15-25 (context for line 21) ---"
  sed -n '15,25p' .pre-commit-config.yaml | cat -n
  echo ""
  echo "--- Lines 65-75 (context for line 69) ---"
  sed -n '65,75p' .pre-commit-config.yaml | cat -n
else
  echo "File not found"
fi

echo ""
echo "=== Checking codespell help for --skip documentation ==="
which codespell > /dev/null 2>&1 && codespell --help | grep -A 10 "\-\-skip" || echo "codespell not installed, checking online documentation"

Repository: NVIDIA/TensorRT-LLM


<shell_result>
Repository: NVIDIA/TensorRT-LLM
Script execution failed with unrecoverable error: [CAPABILITY:RUN_SHELL_SCRIPT] Failed to clone repository NVIDIA/TensorRT-LLM: Clone operation failed
</shell_result>


codespell --skip multiple arguments behavior documentation


<web_search_result>
--skip accepts a single comma-separated list of glob patterns (e.g. --skip=".po,.ts,./vendor/*"). Patterns are parsed as one option value, so quote it (or escape commas) when passing multiple entries on the shell to avoid splitting. Documentation: GitHub README and the man page. [1][2]

Sources:
[1] codespell README (--skip examples).
[2] codespell man page (--skip, description).
</web_search_result>


codespell multiple --skip arguments override last one


<web_search_result>
You're seeing that because codespell treats --skip as a single option that takes a comma-separated list, and later occurrences overwrite earlier ones (command-line options replace previous values). Provide all patterns in one --skip value (or put them in your config file / .codespellrc which supports multiple skip entries). Example:

  • Single CLI: codespell --skip ".po,.ts,./src/3rdParty,./src/Test"
  • Config (.codespellrc or pyproject.toml): skip = '.po,.ts,./src/3rdParty,./src/Test'

References: codespell CLI/docs and project README. [1][2]

Sources:
[1] codespell GitHub README (options and config behavior). [2] codespell manpage / --skip description.
</web_search_result>


Consolidate multiple --skip arguments into a single comma-separated list.

Codespell's --skip option expects a single comma-separated list of glob patterns. When multiple --skip arguments are specified (as on line 69), later occurrences override earlier ones—meaning the first --skip "ATTRIBUTIONS-*.md,*.svg" is ignored, and only --skip "security_scanning/*" takes effect. This likely leaves ATTRIBUTIONS-*.md and *.svg files unchecked.

Combine both patterns into a single argument:

args: ["-L", "Mor,ans,thirdparty", "--skip", "ATTRIBUTIONS-*.md,*.svg,security_scanning/*"]

Additionally, verify consistency with any --skip patterns used elsewhere in the config (e.g., line 21) to ensure uniform glob vs. regex syntax.

🤖 Prompt for AI Agents
In .pre-commit-config.yaml around line 69, multiple --skip args are used which
causes earlier skip patterns to be overridden; consolidate the skip patterns
into a single --skip argument containing a comma-separated list (e.g., combine
ATTRIBUTIONS-*.md, *.svg and security_scanning/* into one --skip value) and
update the args array accordingly; also scan other places in the file (e.g.,
line 21) for --skip usage and make them consistent in using comma-separated glob
patterns rather than multiple --skip entries.

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
hooks:
Expand Down
Loading
Loading