-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add yamllint
to linters
#7818
Add yamllint
to linters
#7818
Conversation
1329762
to
d9f5de3
Compare
We might also want to ignore the
|
d9f5de3
to
9fcb070
Compare
9fcb070
to
37c6c4d
Compare
- 'common/**' | ||
- 'updater/**' | ||
- 'npm_and_yarn/**' | ||
- uses: actions/checkout@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I configured yamllint
to not try to enforce a particular style for indentation, as long as the file was internally consistent.
So here for example, the problem is that the indentation varied depending on the section of the file.
- "composer/helpers/v2/vendor/*" | ||
- "github_actions/spec/fixtures/*" | ||
- go_modules/spec/fixtures/projects/nested_vendor/nested/vendor/github.com/pkg/errors/appveyor.yml | ||
- go_modules/spec/fixtures/projects/vendor/vendor/github.com/pkg/errors/appveyor.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, I'd rather disable within the yaml file itself by adding: # yamllint disable-file
to the top of the file. However, for both of these files, since they were vendored from upstream, I thought better to explicitly ignore here... that way we can easily rebuild the fixture w/o worrying about comment diffs.
37c6c4d
to
1620882
Compare
1620882
to
a128928
Compare
@@ -1,5 +1,5 @@ | |||
name: Specs | |||
on: | |||
on: # yamllint disable-line rule:truthy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# yamllint disable-line rule:truthy
This was annoying to disable on a case-by-case basis, but the rule looks actually helpful, so I left it enabled and just added inline comments.
We've got a lot of YAML in this repo... as this repo gets more popular, we'll benefit from having some consistency / linter in place. I loosened up the default rule set a bit to allow flexibility for a variety of styles, as long as things were internally consistent to the file.
a128928
to
d027063
Compare
We've got a lot of YAML in this repo... as this repo gets more popular, we'll benefit from having some consistency / linter in place.
Fix #5572