generated from AOSSIE-Org/Template-Repo
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (47 loc) · 1.65 KB
/
.pre-commit-config.yaml
File metadata and controls
52 lines (47 loc) · 1.65 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
# Pre-commit hooks configuration
# Documentation: https://pre-commit.com/
#
# Installation:
# pip install pre-commit
# pre-commit install
#
# Usage:
# pre-commit run --all-files # Run on all files
# pre-commit run <hook-id> # Run specific hook
#
# For queries and documentation, visit: https://pre-commit.com/hooks.html
repos:
# ----------------------------------
# 1. Universal Git / file hygiene
# ----------------------------------
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
- id: mixed-line-ending
args: ['--fix=lf']
# ----------------------------------
# 2. Config & data files validation
# ----------------------------------
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
# ----------------------------------
# 3. Security (language-agnostic)
# ----------------------------------
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
# args: ['--baseline', '.secrets.baseline'] (Maintainers should add a .secrets.baseline file for secret scanning.)
# ==============================================================================
# IMPORTANT:
# Pre-commit runs locally every time you commit; only simple logic should be included here.
# Heavy operations should be handled by CI/CD pipelines (GitHub Actions, etc.)
# ==============================================================================