Skip to content

Commit 06006f0

Browse files
committed
YAML linting configuration
1 parent e33475b commit 06006f0

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: v2.5.0 # Use the ref you want to point at
44
hooks:
55
- id: trailing-whitespace
6-
types: [python]
6+
types: [file, python, yaml]
77
- id: end-of-file-fixer
88
types: [python]
99
- id: requirements-txt-fixer
@@ -24,3 +24,8 @@ repos:
2424
hooks:
2525
- id: flake8
2626
types: [python]
27+
28+
- repo: https://github.com/adrienverge/yamllint
29+
rev: v1.23.0
30+
hooks:
31+
- id: yamllint

.yamllint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
extends: default
2+
3+
rules:
4+
document-start:
5+
present: False
6+
truthy:
7+
allowed-values:
8+
- 'True'
9+
- 'False'
10+
level: error
11+
comments:
12+
min-spaces-from-content: 2

lint-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ black>=19.10b0
22
flake8
33
pycodestyle>=2.5.0
44
pytest>=5.4.1
5+
yamllint>=1.23.0

0 commit comments

Comments
 (0)