roboluke-tasks/.pre-commit-config.yaml

61 lines
1.4 KiB
YAML
Raw Normal View History

2024-08-04 19:47:43 +02:00
fail_fast: false
minimum_pre_commit_version: 3.8.0
default_install_hook_types: [pre-commit, commit-msg]
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- id: check-docstring-first
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: detect-private-key
- id: no-commit-to-branch
- id: requirements-txt-fixer
- id: name-tests-test
args: [--pytest-test-first]
- id: pretty-format-json
args: [--autofix]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
hooks:
- id: ruff-format # Run the formatter.
- id: ruff # Run the linter.
args: [--fix]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-use-type-annotations
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]