forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
59 lines (53 loc) · 1.83 KB
/
.pre-commit-config.yaml
File metadata and controls
59 lines (53 loc) · 1.83 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
default_stages: [commit]
# Generated protobuf files should not be linted or formatted.
# They are produced by `make compile-protos-python` and must be excluded globally.
exclude: '^sdk/python/feast/protos/'
repos:
- repo: local
hooks:
# File-aware format hook - only runs on changed Python files
# Runs both ruff check --fix and ruff format
- id: format-files
name: Format Changed Files
stages: [commit]
language: system
types: [python]
exclude: '_pb2\.py$'
entry: bash -c 'uv run ruff check --fix "$@" && uv run ruff format "$@"' --
pass_filenames: true
# File-aware lint hook - only runs on changed Python files
# Runs both ruff check and ruff format --check
- id: lint-files
name: Lint Changed Files
stages: [commit]
language: system
types: [python]
exclude: '_pb2\.py$'
entry: bash -c 'uv run ruff check "$@" && uv run ruff format --check "$@"' --
pass_filenames: true
# Conditional template hook - only runs when template files or roadmap change
- id: template
name: Build Templates
stages: [commit]
language: system
files: ^infra/templates/|\.jinja2$|^docs/roadmap\.md$
entry: uv run make build-templates
pass_filenames: false
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: |
(?x)^(
.*\.lock|
.*requirements.*\.txt|
.*\.svg|
.*\.html
)$
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]