1
0
mirror of https://gitlab.com/baco/dotconf.git synced 2024-06-19 14:17:03 +00:00
dotfiles/templates/_pre-commit-config.yaml
Dionisio E Alonso bd435b7730 feat(template): Make pre-commit hooks read configs from config files
When possible, for pre-commit hooks, instead of receiving arguments via
command line, make them read their config from a configuration file to
achieve the same behavior as invoking the corresponding tool outside
pre-commit.
2024-02-26 11:32:51 -03:00

74 lines
2.0 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-toml
- id: check-yaml
exclude: .chart/
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
hooks:
- id: ruff
args: [--config=./backoffice/ceg/pyproject.toml]
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
args: [--toml-config=./pyproject.toml]
additional_dependencies: [Flake8-pyproject]
language: system # don't commit!!
- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
hooks:
- id: pylint
args: [--rcfile=./pyproject.toml]
# disabled plugins: pylint.extensions.mccabe
exclude: tests|tests/input|tests/extensions/data|tests/regrtest_data|tests/data|doc
language: system # don't commit!!
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
args: [--show-column-numbers, --pretty, --ignore-missing-imports, --follow-imports=silent]
additional_dependencies: [types-all]
#exclude: migrations/
language: system # don't commit!!
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py311-plus]
args: [--py37-plus]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: [--check-only, --line-length=120, --diff]
args: [--check-only, --profile=django, --line-length=120, --diff, --py=37, --src=ceg/]
- repo: https://github.com/jazzband/pip-tools
rev: 7.3.0
hooks:
- id: pip-compile
name: pip-compile requirements.txt
files: ^requirements\.(in|txt)$
args: [requirements.txt]
- id: pip-compile
name: pip-compile requirements-dev.in
files: ^requirements-dev\.(in|txt)$
args: [requirements-dev.in]
- id: pip-compile
name: pip-compile requirements-lint.in
files: ^requirements-lint\.(in|txt)$
args: [requirements-lint.in]