-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve yamllint messages and documentation (#2148)
- Loading branch information
Showing
13 changed files
with
145 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# missing document-start | ||
foo: ... | ||
foo: ... # <-- key-duplicates | ||
bar: ... # <-- wrong comment indentation | ||
|
||
# next line has trailing-spaces: | ||
other: aaa | ||
|
||
# ^ empty-lines |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## yaml | ||
|
||
Our linter also includes violations reported by [yamllint](https://github.com/adrienverge/yamllint) | ||
but it uses a slightly different default configuration. We will still load | ||
custom yamllint configuration files, but the defaults come from | ||
ansible-lint, not from yamllint. | ||
|
||
You can fully disable all yamllint violations by adding `yaml` to the `skip_list`. | ||
|
||
Specific tag identifiers that are printed at the end of rule name, | ||
like `yaml[trailing-spaces]` or `yaml[indentation]` can also be be skipped, allowing | ||
you to have a more fine control. | ||
|
||
### Problematic code | ||
|
||
```yaml | ||
# missing document-start | ||
foo: ... | ||
foo: ... # <-- key-duplicates | ||
bar: ... # <-- wrong comment indentation | ||
``` | ||
### Correct code | ||
```yaml | ||
--- | ||
foo: ... | ||
bar: ... # comment | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters