lint

Runs static-analysis tools over changed files and reports only newly introduced findings.

Updated Dec 27, 2025
One-click install
npx skills add https://github.com/HendrikGC02/Astroray --skill lint-hendrikgc02
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lint
Source: https://github.com/HendrikGC02/Astroray/tree/main/.claude/skills/lint
Command: npx skills add https://github.com/HendrikGC02/Astroray --skill lint-hendrikgc02

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Pre-existing lint debt in a large C++/CUDA and Python codebase makes whole-tree linting noisy and useless, so newly introduced defects hide among thousands of legacy findings. This Skill runs deterministic linters only over the files a change touches and subtracts findings present at the base ref, surfacing only what the change newly introduced. ## Core Features & Use Cases - Differential linting: Runs ruff, cppcheck, clang-format, markdownlint, codespell, shellcheck, and git-diff-check over changed files, then re-runs them against a throwaway git worktree of the base ref and subtracts pre-existing findings. - Honest coverage reporting: A missing linter is reported as unavailable with an install hint, never counted as a pass; a crashing tool is an error, and nothing is ever auto-fixed. - Use Case: Before opening a pull request on the Astroray renderer, run the check command to catch formatting issues, cppcheck-class bugs, spelling mistakes, and trailing whitespace in your diff, so expensive model reviewers focus on ABI and physics parity instead of style nits. ## Quick Start Ask the assistant to run the lint skill's check command against origin/main to report only the new findings introduced by the current branch.

Frequently Asked Questions about lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lint only the files changed in my branch?▼

Run python .claude/skills/lint/scripts/lint.py check, which diffs against origin/main by default and lints only changed files. Use --base to pick a different ref or --paths to lint specific files regardless of git state.

How does differential linting suppress pre-existing findings?▼

The script checks out the base ref into a throwaway detached git worktree in the temp directory and runs the same tools there. Findings whose normalized signature (tool, path, rule, digit-normalized message) already exist at the base are subtracted, so only new findings are reported.

Which linters does the lint gate run on C++ and Python code?▼

It runs ruff on Python, cppcheck and clang-format on C/C++ (clang-format only when a root .clang-format exists), markdownlint-cli2 on Markdown, codespell on code and docs, shellcheck on shell scripts, plus a built-in git diff --check for whitespace and conflict markers.

What happens when a linter is not installed?▼

A missing linter is reported as unavailable with an install hint and is never counted as a pass. Passing --require-coverage turns a language with no available linter into exit code 3, making the coverage gap explicit.

Why does clang-format not run on my C++ changes?▼

clang-format stays dormant unless a .clang-format file exists at the repository root, because without a project style it would emit noise against LLVM defaults. Add a root .clang-format deliberately to enable it.

Can this lint gate block CI or auto-fix findings?▼

No. It is advisory only, never auto-fixes anything, and is not wired into CI as a blocking gate. The documentation warns that cppcheck false positives on template-heavy code mean it should earn trust before earning a veto.