Skip to content

PlasmaFAIR/fortitude-pre-commit

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.7.4
  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.7.4
  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

License

MIT and 2 other licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages