-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
86 lines (77 loc) · 2.33 KB
/
.pre-commit-config.yaml
File metadata and controls
86 lines (77 loc) · 2.33 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
repos:
# General file formatting and linting
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
- id: mixed-line-ending
# Lua formatting with StyLua
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.4.1
hooks:
- id: stylua-github
args: [--config-path=stylua.toml]
# # Lua linting with Luacheck
# - repo: https://github.com/luarocks/luacheck
# rev: v1.2.0
# hooks:
# - id: luacheck
# args: [--config=.luacheckrc]
# Conventional commit messages
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
# Additional security checks
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline]
exclude: (package.lock.json|lazy-lock.json)
# Neovim config validation
- repo: local
hooks:
- id: validate-nvim-config
name: Validate Neovim Config
entry: scripts/validate.sh
language: script
files: ^(lua/.*\.lua|init\.lua)$
pass_filenames: false
- id: check-lua-syntax
name: Check Lua Syntax
entry: bash -c 'for f in "$@"; do luac -p "$f" || exit 1; done' --
language: system
files: \.lua$
types: [lua]
# Auto-documentation generation
- repo: local
hooks:
- id: generate-plugin-docs
name: Generate Plugin Documentation
entry: scripts/generate-docs.sh
language: script
files: ^lua/plugins/.*\.lua$
pass_filenames: false
stages: [post-commit]
- id: update-readme-plugins
name: Update README with Plugin List
entry: scripts/update-readme.sh
language: script
files: ^lua/plugins/.*\.lua$
pass_filenames: false
stages: [post-commit]
- id: extract-keybindings
name: Extract Keybindings Documentation
entry: scripts/extract-keybindings.py
language: system
files: ^lua/.*\.lua$
pass_filenames: false
stages: [post-commit]