-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.yamllint
94 lines (93 loc) · 2.48 KB
/
.yamllint
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
---
yaml-files:
- "*.yaml"
- "*.yml"
- ".yamllint"
rules:
## enforced rules - breaking these rules will fail linting
## refer to https://yamllint.readthedocs.io/en/stable/rules.html# for more details
# 0 spaces before colons and 1 space after
colons:
level: error
max-spaces-before: 0
max-spaces-after: 1
# 0 spaces before commas and 1 space after
commas:
level: error
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
# requires 1 space after `#` and 1 space from content to `#`
comments:
level: error
require-starting-space: true
ignore-shebangs: true
min-spaces-from-content: 1
# yaml documents should always start with `---`
document-start:
level: error
present: true
# no empty lines at the beginning of the file, maximum 1 empty line at the end of file
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
# maximum 1 space after `-`
hyphens:
level: error
max-spaces-after: 1
# indentation with 2 spaces
# indentation should be consistent
# multi-line strings should be indented
indentation:
level: error
spaces: 2
indent-sequences: consistent
check-multi-line-strings: true
# no duplicate keys
key-duplicates: enable
# 1 new line at end of file
new-line-at-end-of-file: enable
# no trailing spaces
trailing-spaces: enable
####################
# warning only rules
# `{}` can have 1 space inside e.g. `{ allow: space }` or `{allow: space}`
braces:
level: warning
min-spaces-inside: 0
max-spaces-inside: 1
# `[]` can have 1 space inside e.g. `[ allow: space ]` or `[allow: space]`
# empty brackets should not have spaces inside `[]`
brackets:
level: warning
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
# comments should be indented
comments-indentation:
level: warning
# `...` is not required as document-end
document-end:
level: warning
present: false
# empty values should not be present
empty-values:
level: warning
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
# booleans should be `true` or `false`
truthy:
level: warning
################
# disabled rules
# alphabetical ordering of keys in mappings
key-ordering: disable
# set a limit to lines length
line-length: disable
# force the type of new line characters
new-lines: disable
# prevent values with octal numbers
octal-values: disable