2022-10-27 13:15:56 +00:00
|
|
|
repos:
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
name: black
|
|
|
|
# entry: bash -c 'cd spiffworkflow-backend && black'
|
|
|
|
entry: black
|
|
|
|
language: system
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
types: [python]
|
|
|
|
require_serial: true
|
|
|
|
# exclude: ^migrations/
|
|
|
|
exclude: "/migrations/"
|
2022-12-31 04:08:00 +00:00
|
|
|
|
2023-03-13 19:50:34 +00:00
|
|
|
# --preview because otherwise it will not fix long lines if the long lines contain long strings
|
2022-12-31 04:08:00 +00:00
|
|
|
# https://github.com/psf/black/pull/1132
|
|
|
|
# https://github.com/psf/black/pull/1609
|
2023-03-13 19:50:34 +00:00
|
|
|
# --line-length because then we can avoid the fancy line wrapping in more instances and jason, kb, and elizabeth
|
|
|
|
# kind of prefer long lines rather than cutely-formatted sets of lines.
|
|
|
|
# TODO: enable when its safe to update the files
|
2023-03-15 20:24:08 +00:00
|
|
|
args: [--preview, --line-length, "119"]
|
2022-12-31 04:08:00 +00:00
|
|
|
|
2022-10-27 13:15:56 +00:00
|
|
|
- id: check-added-large-files
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
name: Check for added large files
|
|
|
|
entry: check-added-large-files
|
|
|
|
language: system
|
|
|
|
- id: check-toml
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
name: Check Toml
|
|
|
|
entry: check-toml
|
|
|
|
language: system
|
|
|
|
types: [toml]
|
|
|
|
- id: check-yaml
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
name: Check Yaml
|
|
|
|
entry: check-yaml
|
|
|
|
language: system
|
|
|
|
types: [yaml]
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
name: Fix End of Files
|
|
|
|
entry: end-of-file-fixer
|
|
|
|
language: system
|
|
|
|
types: [text]
|
|
|
|
stages: [commit, push, manual]
|
2023-05-27 00:01:08 +00:00
|
|
|
- id: ruff
|
2022-10-27 13:15:56 +00:00
|
|
|
files: ^spiffworkflow-backend/
|
2023-05-27 00:01:08 +00:00
|
|
|
name: ruff
|
|
|
|
entry: ruff
|
2022-10-27 13:15:56 +00:00
|
|
|
language: system
|
|
|
|
types: [python]
|
|
|
|
require_serial: true
|
|
|
|
- id: trailing-whitespace
|
|
|
|
files: ^spiffworkflow-backend/
|
|
|
|
name: Trim Trailing Whitespace
|
|
|
|
entry: trailing-whitespace-fixer
|
|
|
|
language: system
|
|
|
|
types: [text]
|
|
|
|
stages: [commit, push, manual]
|
|
|
|
exclude: "/migrations/"
|
|
|
|
# - repo: https://github.com/pre-commit/mirrors-prettier
|
|
|
|
# rev: v2.4.1
|
|
|
|
# hooks:
|
|
|
|
# - id: prettier
|
|
|
|
# files: ^spiffworkflow-backend/
|
|
|
|
# exclude_types: [html]
|