-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
31 lines (29 loc) · 1.25 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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
# Run the formatter.
- id: ruff-format
args: [--config=pyproject.toml]
# Run the linter.
- id: ruff
args: [--config=pyproject.toml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
# note: pre-commit runs top-to-bottom, so put the hooks that modify content first,
# followed by checks that might be more likely to pass after the modifactaion hooks (like flake8)
hooks:
# Checks for large files added to the repository, typically to prevent accidental inclusion of large binaries or datasets.
- id: check-added-large-files
# Detects potential filename conflicts due to case-insensitive filesystems (e.g., Windows) where File.txt and file.txt would be considered the same.
- id: check-case-conflict
# Checks for files that contain merge conflict strings (e.g., <<<<<<<, =======, >>>>>>>).
- id: check-merge-conflict
# Validates YAML files for syntax errors.
- id: check-yaml
# Detects debug statments (e.g., print, console.log, etc.) left in code.
- id: debug-statements
# Ensures files have a newline at the end.
- id: end-of-file-fixer
# Removes trailing whitespace characters from files.
- id: trailing-whitespace