2022-02-27 09:33:59 -08:00
|
|
|
# This file configures pre-commit hooks.
|
|
|
|
|
# See https://pre-commit.com/ for general information
|
|
|
|
|
# See https://pre-commit.com/hooks.html for a listing of possible hooks
|
|
|
|
|
|
|
|
|
|
repos:
|
2022-03-03 09:35:00 -08:00
|
|
|
# General hooks
|
2022-02-27 09:33:59 -08:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-04-18 00:26:10 +00:00
|
|
|
rev: v4.6.0
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: check-docstring-first
|
|
|
|
|
- id: check-json
|
|
|
|
|
exclude: "tsconfig.*json"
|
|
|
|
|
- id: check-yaml
|
2024-01-03 00:19:19 -08:00
|
|
|
args:
|
|
|
|
|
- "--unsafe"
|
2022-02-27 09:33:59 -08:00
|
|
|
- id: check-toml
|
|
|
|
|
- id: check-executables-have-shebangs
|
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
exclude_types:
|
|
|
|
|
- svg
|
|
|
|
|
- pofile
|
2023-01-08 13:50:48 -08:00
|
|
|
exclude: "(^LICENSE$)"
|
2022-02-27 09:33:59 -08:00
|
|
|
- id: mixed-line-ending
|
|
|
|
|
args:
|
|
|
|
|
- "--fix=lf"
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
exclude_types:
|
|
|
|
|
- svg
|
|
|
|
|
- id: check-case-conflict
|
|
|
|
|
- id: detect-private-key
|
2024-01-08 13:03:05 -08:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2024-01-09 10:30:33 -08:00
|
|
|
rev: v2.2.6
|
2024-01-08 13:03:05 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: codespell
|
2024-01-09 10:30:33 -08:00
|
|
|
exclude: "(^src-ui/src/locale/)|(^src-ui/e2e/)|(^src/paperless_mail/tests/samples/)"
|
2024-01-08 13:03:05 -08:00
|
|
|
exclude_types:
|
|
|
|
|
- pofile
|
|
|
|
|
- json
|
2022-02-27 09:33:59 -08:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2023-11-13 09:09:56 -08:00
|
|
|
rev: 'v3.1.0'
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: prettier
|
|
|
|
|
types_or:
|
|
|
|
|
- javascript
|
|
|
|
|
- ts
|
|
|
|
|
- markdown
|
2023-01-08 13:50:48 -08:00
|
|
|
exclude: "(^Pipfile\\.lock$)"
|
2022-03-03 09:35:00 -08:00
|
|
|
# Python hooks
|
2023-09-08 08:53:07 -07:00
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
2024-04-23 14:53:56 +00:00
|
|
|
rev: 'v0.4.1'
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
2023-03-28 09:39:30 -07:00
|
|
|
- id: ruff
|
2023-09-08 08:53:07 -07:00
|
|
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
2024-04-18 00:26:10 +00:00
|
|
|
rev: 24.4.0
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: black
|
2022-03-03 09:35:00 -08:00
|
|
|
# Dockerfile hooks
|
2022-04-18 08:18:20 -07:00
|
|
|
- repo: https://github.com/AleksaC/hadolint-py
|
2023-11-13 09:09:56 -08:00
|
|
|
rev: v2.12.0.3
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
2022-04-18 08:18:20 -07:00
|
|
|
- id: hadolint
|
2022-03-03 09:35:00 -08:00
|
|
|
# Shell script hooks
|
|
|
|
|
- repo: https://github.com/lovesegfault/beautysh
|
|
|
|
|
rev: v6.2.1
|
|
|
|
|
hooks:
|
|
|
|
|
- id: beautysh
|
2022-03-07 13:53:35 -08:00
|
|
|
args:
|
|
|
|
|
- "--tab"
|
2022-02-27 09:33:59 -08:00
|
|
|
- repo: https://github.com/shellcheck-py/shellcheck-py
|
2024-03-21 02:09:37 +00:00
|
|
|
rev: "v0.10.0.1"
|
2022-02-27 09:33:59 -08:00
|
|
|
hooks:
|
|
|
|
|
- id: shellcheck
|