-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
100 lines (85 loc) · 2.85 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
100 lines (85 loc) · 2.85 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Configuration-file for pre-commit
# References:
# - Official docs: https://pre-commit.com
# - for more hooks: https://pre-commit.com/hooks.html
# - https://github.com/pre-commit/pre-commit-hooks
#
# Notes:
# - To avoid duplication, we try to configure the tools in pyproject.toml as much as possible.
# - The setting "language: system" is used to run commands that are already available on your system,
# and pre-commit does not need to create or manage an isolated environment.
#
# Usage:
# > bin/pre-commit install
# > bin/pre-commit install hooks -f
# > bin/pre-commit autoupdate
# > bin/pre-commit run --all-files
repos:
- repo: local
hooks:
- id: ruff-format
name: ruff-format
entry: ruff format
language: system
types: [python]
# - id: ruff-check
# name: ruff-check
# entry: ruff check
# # args: [--fix] # Optional: Automatically fix issues
# language: system
# types: [python]
# The following are all pre-commit-hooks
# docs: https://github.com/pre-commit/pre-commit-hooks
- id: debug-statements
name: check-debug-statements
entry: debug-statement-hook
language: system
types: [python]
- id: lower-case-only
name: lower case only
entry: filenames must be lower-case or lower_case only
language: fail
files: '[^a-z0-9._/-]'
exclude: '^(\.github/.*|etc/ipython/.*/README)$'
- id: check-case-conflict
name: Check for case conflicts.
description: Check for files with names that would conflict on a case-insensitive filesystem.
entry: check-case-conflict
language: system
- id: check-toml
name: check toml syntax
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: check yaml syntax
entry: check-yaml
language: system
types: [yaml]
exclude: '^etc/logging\.yaml$|^src/libranet_logging/etc/logging\.yaml$|^tests/.*\.yaml$'
- id: end-of-file-fixer
name: fix end of files (EOF)
entry: end-of-file-fixer
language: system
types: [python]
- id: trailing-whitespace
name: fix trailing whitespace (EOL)
entry: trailing-whitespace-fixer
language: system
types: [text]
- id: mixed-line-ending
name: fix mixed line ending (CLRF/LF)
entry: mixed-line-ending
language: system
types: [text]
# - id: fix-encoding-pragma
# name: fix encoding pragma
# entry: fix-encoding-pragma --remove
# language: system
# types: [python]
- id: uv-lock-check
name: uv-lock-check
description: check uv.lock is in sync
entry: uv lock --check
language: system
pass_filenames: false