2020-01-28 16:12:40 +00:00
|
|
|
---
|
|
|
|
minimum_pre_commit_version: 1.15.2
|
|
|
|
repos:
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-02-08 11:16:02 -07:00
|
|
|
rev: v4.5.0
|
2020-01-28 16:12:40 +00:00
|
|
|
hooks:
|
|
|
|
- id: check-merge-conflict # Check for files that contain merge conflict strings.
|
|
|
|
- id: trailing-whitespace # Trims trailing whitespace.
|
|
|
|
args: [--markdown-linebreak-ext=md]
|
|
|
|
- id: mixed-line-ending # Replaces or checks mixed line ending.
|
|
|
|
args: [--fix=lf]
|
|
|
|
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
|
|
|
|
|
2022-08-10 16:49:09 +01:00
|
|
|
- repo: https://github.com/executablebooks/mdformat
|
2024-02-08 11:16:02 -07:00
|
|
|
rev: 0.7.17
|
2022-08-10 16:49:09 +01:00
|
|
|
hooks:
|
|
|
|
- id: mdformat
|
|
|
|
|
2023-04-11 14:36:57 +01:00
|
|
|
- repo: https://github.com/s0undt3ch/python-tools-scripts
|
2024-02-08 11:16:02 -07:00
|
|
|
rev: "0.18.6"
|
2023-04-11 14:36:57 +01:00
|
|
|
hooks:
|
|
|
|
- id: tools
|
|
|
|
alias: actionlint
|
|
|
|
name: Lint GitHub Actions Workflows
|
|
|
|
files: "^.github/workflows/"
|
|
|
|
types:
|
|
|
|
- yaml
|
|
|
|
args:
|
|
|
|
- pre-commit
|
|
|
|
- actionlint
|
|
|
|
|
2023-04-11 17:16:05 +01:00
|
|
|
- repo: https://github.com/jazzband/pip-tools
|
2025-01-13 14:38:57 -07:00
|
|
|
rev: 7.4.1
|
2023-04-11 17:16:05 +01:00
|
|
|
hooks:
|
|
|
|
- id: pip-compile
|
|
|
|
files: ^requirements/release\.(in|txt)$
|
|
|
|
args:
|
|
|
|
- requirements/release.in
|
|
|
|
|
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2024-02-08 11:16:02 -07:00
|
|
|
rev: v3.15.0
|
2023-04-11 17:16:05 +01:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
2024-12-12 10:24:19 -07:00
|
|
|
name: Rewrite Code to be Py3.6+
|
|
|
|
args: [--py36-plus]
|
|
|
|
## DGM name: Rewrite Code to be Py3.9+
|
|
|
|
## DGM args: [--py39-plus]
|
2023-04-11 17:16:05 +01:00
|
|
|
|
|
|
|
- repo: https://github.com/asottile/reorder_python_imports
|
2024-02-08 11:16:02 -07:00
|
|
|
rev: v3.12.0
|
2023-04-11 17:16:05 +01:00
|
|
|
hooks:
|
|
|
|
- id: reorder-python-imports
|
2024-06-20 11:04:19 -06:00
|
|
|
args: [--py310-plus]
|
2023-04-11 17:16:05 +01:00
|
|
|
|
|
|
|
- repo: https://github.com/psf/black
|
2024-11-04 15:40:40 -07:00
|
|
|
rev: 24.10.0
|
2023-04-11 17:16:05 +01:00
|
|
|
hooks:
|
|
|
|
- id: black
|
|
|
|
args: []
|
|
|
|
|
|
|
|
# - repo: https://github.com/PyCQA/flake8
|
|
|
|
# rev: 3.9.2
|
|
|
|
# hooks:
|
|
|
|
# - id: flake8
|
|
|
|
# language_version: python3
|
|
|
|
# additional_dependencies:
|
|
|
|
# - flake8-mypy-fork
|
|
|
|
# - flake8-docstrings
|
|
|
|
# - flake8-typing-imports
|
|
|
|
#
|
|
|
|
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
|
|
# rev: v1.0.0
|
|
|
|
# hooks:
|
|
|
|
# - id: mypy
|
|
|
|
# alias: mypy-tools
|
|
|
|
# name: Run mypy against tools
|
|
|
|
# files: ^tools/.*\.py$
|
|
|
|
# #args: [--strict]
|
|
|
|
# additional_dependencies:
|
|
|
|
# - attrs
|
|
|
|
# - rich
|
|
|
|
# - types-attrs
|
|
|
|
# - types-pyyaml
|
|
|
|
# - types-requests
|
|
|
|
|
2020-01-28 16:12:40 +00:00
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: generate-actions-workflow
|
|
|
|
name: Generate Github Actions Workflow
|
|
|
|
entry: .github/workflows/templates/generate.py
|
|
|
|
pass_filenames: false
|
2022-08-11 14:40:07 +01:00
|
|
|
files: '^.github/workflows/.*$'
|
2020-01-28 16:12:40 +00:00
|
|
|
language: script
|
|
|
|
|
|
|
|
- id: shellcheck
|
|
|
|
name: Run ShellCheck against bootstrap-salt.sh
|
2022-03-15 10:20:49 +01:00
|
|
|
entry: koalaman/shellcheck-alpine:v0.7.0 shellcheck -s sh -f tty
|
2020-01-28 16:12:40 +00:00
|
|
|
files: 'bootstrap-salt\.sh'
|
|
|
|
language: docker_image
|