-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
47 lines (47 loc) · 1.67 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
default_language_version:
python: python3.10
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed
args: [--maxkb=5000]
- id: check-merge-conflict # Check for files that contain merge conflict strings
- id: check-toml # Attempts to load all TOML files to verify syntax
- id: detect-private-key # Checks for the existence of private keys
# - id: check-json # Attempts to load all json files to verify syntax
# exclude: ^.vscode
# - id: pretty-format-json # Checks that all your JSON files are pretty.
# args: [--autofix, --indent, "4"]
# exclude: ^.vscode, ^.venv, ^.github, ^.gitlab, ^.pytest_cache, ^__pycache__
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks
# name: gitleaks
# entry: gitleaks protect --verbose --staged --no-banner
# language: system
# types: [file]
- repo: local
hooks:
- id: ruff
name: ruff
entry: poetry run ruff --no-cache --force-exclude --fix --exit-non-zero-on-fix --show-fixes .
language: system
types: [python]
- id: check-poetry
name: Poetry check
description: Validates the structure of the pyproject.toml file
entry: poetry check
language: system
pass_filenames: false
# files: pyproject.toml