-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (45 loc) · 1.41 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
49 lines (45 loc) · 1.41 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
# Pre-commit hooks for obsctl - Essential quality gates
repos:
# Basic file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: '\.md$'
- id: end-of-file-fixer
exclude: '\.md$'
- id: check-yaml
args: ['--unsafe']
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=500']
# Conventional commits enforcement
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "ci", "build", "revert", "--optional-scopes", "api,cli,otel,config,packaging,ci,docs,tests", "--strict"]
# Rust-specific hooks (essential only)
- repo: local
hooks:
- id: cargo-fmt
name: Cargo Format Check
entry: cargo fmt
args: ["--all", "--check"]
language: system
types: [rust]
pass_filenames: false
- id: cargo-check
name: Cargo Check Compilation
entry: cargo check
args: ["--all-targets", "--all-features"]
language: system
types: [rust]
pass_filenames: false
# Global configuration
default_stages: [pre-commit]
fail_fast: false
minimum_pre_commit_version: "3.0.0"