-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.pre-commit-config.yaml
40 lines (40 loc) · 969 Bytes
/
.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
default_stages: [push]
default_language_version:
python: python3.9
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.8
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
stages: [commit,push]
- id: check-added-large-files
- id: check-ast
stages: [commit,push]
- id: check-case-conflict
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-docstring-first
stages: [commit,push]
- id: check-json
- id: check-merge-conflict
stages: [commit,push]
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: forbid-new-submodules
- id: no-commit-to-branch
stages: [commit,push]
args:
- --branch=main