Skip to content

Repository files navigation

fortitude-pre-commit

A pre-commit hook for Fortitude.

Distributed as a standalone repository to enable installing Fortitude via prebuilt wheels from PyPI.

Using Fortitude with pre-commit

To run Fortitude via pre-commit, add the following to your .pre-commit-config.yaml:

repos:
- repo: https://github.com/PlasmaFAIR/fortitude-pre-commit
  # Fortitude version.
  rev: v0.9.2
  hooks:
    - id: fortitude

Extra arguments may be provided to the lint hook:

repos:
- repo: https://github.com/PlasmaFAIR/fortitude-pre-commit
  # Fortitude version.
  rev: v0.9.2
  hooks:
    - id: fortitude
      args: ["--fix", "--unsafe-fixes", "--preview"]

When running with --fix, Fortitude's lint hook should be placed before any code formatters in use.

Note that Fortitude will run with the option --force-exclude switched on by default. This will prevent Fortitude from checking files that have been explicitly added to your exclude list in fpm.toml or fortitude.toml.

License

This repository in based on ruff-pre-commit, which is licensed under either of:

It is additionally licensed under the MIT license for the PlasmaFAIR project.

About

A pre-commit hook for Fortitude

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages