forked from grafana/pyroscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
24 lines (22 loc) · 914 Bytes
/
Copy path.pre-commit-config.yaml
File metadata and controls
24 lines (22 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Pre-commit hooks that delegate to Makefile targets
# This ensures CI and local development use the same formatting/linting logic
repos:
- repo: local
hooks:
- id: fmt
name: Format code (Go, protobuf, jsonnet)
entry: make fmt
language: system
pass_filenames: false
# Run on any file change - make fmt handles file filtering internally
always_run: true
- id: generate
name: Check generated protobuf files
entry: make generate check/unstaged-changes
language: system
pass_filenames: false
# Only run when protobuf-related files in api/ or pkg/ are staged
# This matches: api/**/*.proto, pkg/**/*.proto, api/buf*.yaml, pkg/buf*.yaml
# Root-level YAML files (renovate.json, .golangci.yml, etc.) are excluded
files: '^(api|pkg)/.*\.(proto|yaml)$'
default_install_hook_types: [pre-push]