Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d1a464

Browse files
committed
Use more-standard yaml format
1 parent 47b7ca4 commit 6d1a464

5 files changed

Lines changed: 23 additions & 44 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11

2-
-
3-
repo: [email protected]:pre-commit/pre-commit-hooks
2+
- repo: [email protected]:pre-commit/pre-commit-hooks
43
sha: 12794c1c19c001e3d05bcfe316b4f93b414035a7
54
hooks:
6-
-
7-
id: pyflakes
5+
- id: pyflakes
86
files: '\.py$'
9-
-
10-
id: debug-statements
7+
- id: debug-statements
118
files: '\.py$'
12-
-
13-
id: trailing-whitespace
9+
- id: trailing-whitespace
1410
files: '\.(py|sh)$'
15-
-
16-
id: name-tests-test
11+
- id: name-tests-test
1712
files: 'tests/.+\.py$'
1813

19-
-
20-
repo: [email protected]:pre-commit/pre-commit
21-
sha: c77d65d9cbbcf30e2be005f5ba8b63447deedc1e
14+
- repo: [email protected]:pre-commit/pre-commit
15+
sha: 47b7ca44ed1fcaa83464ed00cef72049ae22c33d
2216
hooks:
23-
-
24-
id: validate_manifest
17+
- id: validate_manifest
2518
files: /manifest.yaml
26-
-
27-
id: validate_config
19+
- id: validate_config
2820
files: /\.pre-commit-config.yaml

example_manifest.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
# Hooks are set up as follows
3-
# -
4-
# id: hook_id
3+
# - id: hook_id
54
# name: 'Readable name'
65
# entry: my_hook_executable
76
#
@@ -14,15 +13,13 @@
1413
# # Optional, defaults to zero
1514
# expected_return_value: 0
1615

17-
-
18-
id: my_hook
16+
- id: my_hook
1917
name: My Simple Hook
2018
description: This is my simple hook that does blah
2119
entry: my-simple-hook.py
2220
language: python
2321
expected_return_value: 0
24-
-
25-
id: my_grep_based_hook
22+
- id: my_grep_based_hook
2623
name: My Bash Based Hook
2724
description: This is a hook that uses grep to validate some stuff
2825
entry: ./my_grep_based_hook.sh

example_pre-commit-config.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11

2-
-
3-
repo: [email protected]:pre-commit/pre-commit-hooks
2+
- repo: [email protected]:pre-commit/pre-commit-hooks
43
sha: cd74dc150c142c3be70b24eaf0b02cae9d235f37
54
hooks:
6-
-
7-
id: pyflakes
5+
- id: pyflakes
86
files: '\.py$'
9-
-
10-
id: jslint
7+
- id: jslint
118
files: '\.js$'
12-
-
13-
id: trim_trailing_whitespace
9+
- id: trim_trailing_whitespace
1410
files: '\.py$'

manifest.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11

2-
-
3-
id: validate_manifest
2+
- id: validate_manifest
43
name: Validate Pre-Commit Manifest
54
description: This validator validates a pre-commit hooks manifest file
65
entry: validate-manifest
76
language: python
8-
-
9-
id: validate_config
7+
- id: validate_config
108
name: Validate Pre-Commit Config
119
description: This validator validates a pre-commit hooks config file
1210
entry: validate-config
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11

2-
-
3-
repo: [email protected]:pre-commit/pre-commit-hooks
2+
- repo: [email protected]:pre-commit/pre-commit-hooks
43
hooks:
5-
-
6-
id: pyflakes
7-
-
8-
id: jslint
9-
-
10-
id: trim_trailing_whitespace
11-
files: '*.py'
4+
- id: pyflakes
5+
- id: jslint
6+
- id: trim_trailing_whitespace
7+
files: '*.py'

0 commit comments

Comments
 (0)