-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
52 lines (47 loc) · 1.44 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
52 lines (47 loc) · 1.44 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 for SkinLab
# Install: brew install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
- repo: local
hooks:
# SwiftLint - Check code style
- id: swiftlint
name: SwiftLint
entry: swiftlint lint --strict --quiet
language: system
files: \.swift$
exclude: (Pods|DerivedData|\.build)/
# SwiftFormat - Check formatting
- id: swiftformat-check
name: SwiftFormat Check
entry: swiftformat --lint .
language: system
files: \.swift$
exclude: (Pods|DerivedData|\.build)/
pass_filenames: false
# Secrets check - Prevent accidental secret commits
- id: secrets-check
name: Secrets Check
entry: scripts/check-secrets.sh
language: script
files: \.(swift|plist|xcconfig|json|yml|yaml)$
# Large files check
- id: large-files
name: Large Files Check
entry: scripts/check-large-files.sh
language: script
always_run: true
# Standard pre-commit hooks
- 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: (\.xcodeproj|\.pbxproj)$
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: detect-private-key
- id: no-commit-to-branch
args: [--branch, main]