diff --git a/README.md b/README.md index 02f454402..2460dee0d 100644 --- a/README.md +++ b/README.md @@ -326,13 +326,21 @@ code take effect without needing to reinstall. ## Linting -To run linting checks: +We use `pre-commit` to run ruff, pyright, and other checks automatically. +– One-time setup (installs the git hook): ```bash pip install pre-commit +pre-commit install +``` + +– Run all checks across the repository: +```bash pre-commit run --all-files ``` +Note: You can still run the underlying tools directly via `./lint.sh [fix|check|unsafe]`. + ## License Helion is BSD-style licensed, as found in the LICENSE file. diff --git a/docs/installation.md b/docs/installation.md index c3b04b4d4..2e8b84676 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -126,10 +126,14 @@ If you installed with `[dev]`, you get additional development tools: - **pytest** - Test runner - **pre-commit** - Code formatting and linting hooks -Set up pre-commit hooks for development: +Set up and use pre-commit for linting: ```bash +# Install pre-commit hooks into your local git repo (one-time) pre-commit install + +# Run all checks across the repository +pre-commit run --all-files ``` ## Optional Dependencies