-
Notifications
You must be signed in to change notification settings - Fork 52
/
.pre-commit-hooks.yaml
117 lines (101 loc) · 3.27 KB
/
.pre-commit-hooks.yaml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
# This file tells https://pre-commit.com/
# which hooks are provided by this repo
# for use by other git repos.
- id: bundler-audit
name: Patch-level verification for bundler
description: Check for vulnerable gem versions and insecure sources
entry: run-bundle-audit
language: ruby
pass_filenames: false
files: Gemfile.lock
args: [--update]
- id: check-mailmap
name: Detect if an email address needs to be added to mailmap
language: script
entry: pre_commit_hooks/check-mailmap
always_run: true # Run on every commit.
exclude: .* # Otherwise runs once per file.
- id: fasterer
name: Suggest speed improvements in Ruby
description: Use fasterer to suggest speed improvements in Ruby
entry: run-fasterer
language: ruby
types: ['ruby']
- id: forbid-binary
name: Forbid binaries
description: Forbid binary files from being committed
entry: pre_commit_hooks/forbid-binary
language: script
types: ['binary']
- id: forbid-space-in-indent
name: Forbid spaces in indentation
description: Forbid spaces in indentation
entry: pre_commit_hooks/forbid-space-in-indent
language: script
- id: git-check
name: Check for conflict markers and core.whitespace errors
# yamllint disable-line rule:line-length
description: Use git to check for conflict markers and core.whitespace errors, respecting .gitattributes
entry: pre_commit_hooks/git-check
language: script
- id: git-dirty
name: Check if the git tree is dirty
description: Detect if git tree contains modified, staged, or untracked files
entry: pre_commit_hooks/git-dirty
language: script
- id: markdownlint
name: Check markdown files
description: Check markdown files and flag style issues
entry: run-mdl
language: ruby
types: ['markdown']
- id: protect-first-parent
name: Protect first parent
description: Protect first parent from foxtrot merges
entry: pre_commit_hooks/protect-first-parent
language: script
always_run: true
pass_filenames: false
- id: reek
name: Find ruby code smells
description: Use reek to find ruby code smells
entry: run-reek
language: ruby
types: ['ruby']
- id: require-ascii
name: Check file encoding
description: Ensure file is ascii-encoded
entry: require-ascii.py
language: python
types: [text]
- id: rubocop
name: Check Ruby style with rubocop and rubocop-rspec
description: Enforce Ruby style guide with rubocop and rubocop-rspec
entry: run-rubocop
language: ruby
types: ['ruby']
- id: shellcheck
name: Test shell scripts with shellcheck
description: Shell scripts conform to shellcheck
entry: pre_commit_hooks/shellcheck
language: script
types: [shell]
args: [-e, SC1091]
- id: script-must-have-extension
name: Non-executable shell script filename ends in .sh
description: Non-executable shell script filename ends in .sh
entry: pre_commit_hooks/script_must_have_extension
language: script
types: [shell, non-executable]
- id: script-must-not-have-extension
name: Executable shell script omits the filename extension
description: Executable shell script omits the filename extension
entry: pre_commit_hooks/script_must_not_have_extension
language: script
types: [shell, executable]
- id: shfmt
name: Check shell style with shfmt
language: script
entry: pre_commit_hooks/shfmt
types: [shell]