Contributing
Contributions are welcome: bug reports with a small invented example, new rules, fixes and documentation. The full guide is CONTRIBUTING.md in the repository; read DESIGN.md first. Its principles decide most reviews: no false positives, exact Jython, byte-exact fixes, precise locations, and no customer data.
In short:
cargo test --workspacecargo clippy --workspace --all-targets -- -D warningscargo fmt --all- Adding a rule: pick a code and name, write the rule with its
RuleMeta(summary, explanation with "What it does", "Why is this bad?" and "Example", options), register it, test what it reports and what it must not report, and regenerate the documentation withcargo run -p iglint -- generate-docs. - Never commit customer data: no snippets, names or identifiers from real projects. Examples and test fixtures are invented.
- Performance is a feature: changes to the parsers, the project model or the driver come with benchmark numbers.
This documentation site
Section titled “This documentation site”The site is built with Astro Starlight from the site/ directory of the repository (Node.js 22.23 or newer):
cd sitenpm installnpm run dev # http://localhost:4321, reloads on changenpm run build # static site in site/dist- Hand-written pages are Markdown files in
site/src/content/docs/. - Rule pages are generated.
iglint generate-docswritesdocs/rules/*.mdfrom the rule metadata in the code, and CI fails when they are out of date. Before everydevandbuild,site/scripts/sync-docs.mjscopies them into the site (with the rules overview and the sidebar built fromdocs/rules/README.md), together withdocs/compat/ign-lint-differences.md,docs/internal/fix-safety.mdandCHANGELOG.md. The copies are not committed: to change a rule page, change the rule's metadata and rungenerate-docs. - The tutorial uses the invented project in
site/examples/quickstart. After a change to the rules,site/scripts/run-example.sh [path/to/iglint]replays it and prints every command with its output, to compare withgetting-started.md. - The site's address is set in one place,
site/site.config.mjs.