1
- # Configuration File for yamllint(1)
1
+ %YAML 1.2
2
2
---
3
+ # Configuration File of yamllint for Travis CI configurations and similarly relaxed YAML documents
4
+ # https://github.com/Lin-Buo-Ren/Configuration-Templates-for-Travis-CI
5
+ #
6
+ # This file is in YAML Ain’t Markup Language (YAML™)
7
+ # http://yaml.org/
8
+ #
9
+ # This file is based on the `default` pre-defined configuration from yamllint with documentation copied from its documentation
10
+ # https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
11
+ #
12
+ # This file is based on The Unofficial yamllint Configuration Templates
13
+ # https://github.com/Lin-Buo-Ren/yamllint-configuration-templates
3
14
rules:
15
+ # Use this rule to control the number of spaces inside braces (`{` and `}`).
16
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.braces
4
17
braces:
5
18
min-spaces-inside: 0
6
19
max-spaces-inside: 0
7
20
min-spaces-inside-empty: -1
8
21
max-spaces-inside-empty: -1
22
+
23
+ # Use this rule to control the number of spaces inside brackets (`[` and `]`).
24
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.brackets
9
25
brackets:
10
26
min-spaces-inside: 0
11
27
max-spaces-inside: 0
12
28
min-spaces-inside-empty: -1
13
29
max-spaces-inside-empty: -1
30
+
31
+ # Use this rule to control the number of spaces before and after colons (`:`).
32
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.colons
14
33
colons:
15
34
max-spaces-before: 0
16
35
max-spaces-after: 1
36
+
37
+ # Use this rule to control the number of spaces before and after commas (`,`).
38
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.commas
17
39
commas:
18
40
max-spaces-before: 0
19
41
min-spaces-after: 1
20
42
max-spaces-after: 1
43
+
44
+ # Use this rule to control the position and formatting of comments.
45
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments
21
46
comments:
22
47
level: warning
48
+ # PATCH: Comments without separate space are disabled content
23
49
require-starting-space: false
50
+ # PATCH: We're good with 1
24
51
min-spaces-from-content: 1
52
+
53
+ # Use this rule to force comments to be indented like content.
54
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments_indentation
55
+ # PATCH: False positives, disabled
25
56
comments-indentation: disable
57
+ #level: warning
58
+
59
+ # Use this rule to require or forbid the use of document end marker (`...`).
60
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_end
26
61
document-end: disable
27
- document-start: disable
62
+
63
+ # Use this rule to require or forbid the use of document start marker (`---`).
64
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.document_start
65
+ document-start:
66
+ # PATCH: Travis CI doesn't allow documents with document start markers
67
+ # https://github.com/travis-ci/travis-ci/issues/9600
68
+ level: error
69
+ present: false
70
+
71
+ # Use this rule to set a maximal number of allowed consecutive blank lines.
72
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_lines
28
73
empty-lines:
29
74
max: 2
30
75
max-start: 0
31
76
max-end: 0
77
+
78
+ # Use this rule to prevent nodes with empty content, that implicitly result in null values.
79
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.empty_values
80
+ empty-values:
81
+ forbid-in-block-mappings: false
82
+ forbid-in-flow-mappings: false
83
+
84
+ # Use this rule to control the number of spaces after hyphens (`-`).
85
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.hyphens
32
86
hyphens:
33
87
max-spaces-after: 1
88
+
89
+ # Use this rule to control the indentation.
90
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.indentation
34
91
indentation:
35
92
spaces: consistent
36
93
indent-sequences: consistent
37
94
check-multi-line-strings: false
95
+
96
+ # Use this rule to prevent multiple entries with the same key in mappings.
97
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_duplicates
38
98
key-duplicates: enable
99
+
100
+ # Use this rule to enforce alphabetical ordering of keys in mappings. The sorting order uses the Unicode code point number. As a result, the ordering is case-sensitive and not accent-friendly (see examples below).
101
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.key_ordering
102
+ key-ordering: disable
103
+
104
+ # Use this rule to set a limit to lines length.
105
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.line_length
39
106
line-length:
40
- max: 9999
107
+ # PATCHED: Modern text editors handle long lines nicely
108
+ max: 99999
41
109
allow-non-breakable-words: true
42
110
allow-non-breakable-inline-mappings: false
111
+
112
+ # Use this rule to require a new line character (`\n`) at the end of files.
113
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.new_line_at_end_of_file
43
114
new-line-at-end-of-file: enable
115
+
116
+ # Use this rule to force the type of new line characters.
117
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.new_lines
44
118
new-lines:
45
119
type: unix
120
+
121
+ # Use this rule to prevent values with octal numbers. In YAML, numbers that start with `0` are interpreted as octal, but this is not always wanted. For instance `010` is the city code of Beijing, and should not be converted to `8`.
122
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.octal_values
123
+ octal-values:
124
+ forbid-implicit-octal: false
125
+ forbid-explicit-octal: false
126
+
127
+ # Use this rule to forbid trailing spaces at the end of lines.
128
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.trailing_spaces
46
129
trailing-spaces: enable
130
+
131
+ # Use this rule to forbid non-explictly typed truthy values other than `true` and `false`, for example `YES`, `False` and `off`.
132
+ # https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.truthy
47
133
truthy:
48
- level: warning
134
+ level: warning
135
+ ...
0 commit comments