Skip to content

rcolfin/pre-commit-hooks

pre-commit-hooks

CI Build License

Some out-of-the-box hooks for pre-commit.

See also: https://github.com/pre-commit/pre-commit

Development

Setup Python Environment:

Run scripts/console.sh

The first time run

uvx pre-commit install

If you need to relock:

Run scripts/lock.sh

Using pre-commit-hooks with pre-commit

Add this to your .pre-commit-config.yaml

-   repo: https://github.com/rcolfin/pre-commit-hooks
    rev: v0.3.1
    hooks:
      - id: mypy-linter
      - id: shellcheck-linter
      - id: uv-check
      - id: uv-lock

mypy-linter

This expects poetry or uv to be used.

To check the pre-commit hooks on all files:

uvx pre-commit run --all-files --verbose

To check on the pre-commit hooks on select files:

uvx pre-commit run --files ./pyproject.toml --verbose

About

Some hooks for pre-commit that work in a mono-repo

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •