-
Notifications
You must be signed in to change notification settings - Fork 128
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
Enforce a standard YAML format #763
base: main
Are you sure you want to change the base?
Enforce a standard YAML format #763
Conversation
This PR requires all files to be formatted with the google YAML formatter before submitting. This can be done with the following commands: go install github.com/google/yamlfmt/cmd/[email protected] yamlfmt . This will enforce a standard style that should remove any issues with formatting of PRs. The actual formatting is done in a subsequent commit.
95bf2c2
to
7c2fd56
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
@stuartwdouglas Is there any specific reason you are using
|
Asking this because I am working on enabling the yamllint for tssc-sample-pipelines repo and I have these rules . Since the sample-pipelines repo sync some yamls from this repository, I want to understand this a bit in depth. |
@@ -0,0 +1,28 @@ | |||
name: Validate PR - YAML Format |
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.
Isn't It would be best if the file started with ---
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.
Why?
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 think ---
makes file structure more explicit, clearer and readable, especially when dealing with complex yaml documents that contains multiple documents concatenated together. I don't think yamlfmt handles this. Correct me if I am wrong.
Doesn't yaml lint just check formatting? Or can it automatically fix the formatting as well? The idea of this is that there is a single standard format, and you can just run the formatter and not have to think about formatting ever again. It means you won't get PRs with formatting changes, and all the files will be consistent. |
yes yamllint just check formatting but my point is the formatting that yamlfmt is doing might be lacking few of the standard like file should start with |
ok maybe for now I will remove the /lgtm |
Looks abandoned, can we close this? |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This PR requires all files to be formatted with the google YAML formatter before submitting. This can be done with the following commands:
go install github.com/google/yamlfmt/cmd/[email protected] yamlfmt .
This will enforce a standard style that should remove any issues with formatting of PRs.
Before you complete this pull request ...
Look for any open pull requests in the repository with the title "e2e-tests update" and
see if there are recent e2e-tests updates that will be applicable to your change.