Closed lucasgonze closed 2 years ago
I have found workarounds (using sed recipes) for all these items, so this is for your own information. Do what you want with it.
The underlying code I'm working on is open source. This my working directory: https://github.com/magma/magma/tree/master/.github/workflows
This is the PR with the yamllint errors: https://github.com/magma/magma/pull/12678
Thanks for flagging this. Given the output is handled by the node YAML
library I'm not sure where to start investigating this. Happy to receive a contribution if anyone wants to pick it up
The right thing would be a pretty printer for the node yaml library. I poked around github and didn't find anything, and it's probably not worth either of our time to invent this, so I'm closing this.
1. Trigging yamllint error "too few spaces before comment"
On running pin-github-action and submitting the output to a CI pipeline that runs yamllint, the error "too few spaces before comment (comments)" is thrown.
Per https://github.com/redhat-developer/vscode-yaml/issues/433, the yamllint default for the number of spaces before a comment is 2. So the output should be:
You can see the default yamllint settings here: https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.comments
2. trailing spaces
Indeed, the line it's complaining about has 10 spaces and nothing else:
3. spaces in brackets
This array replacement is padding square brackets with spaces: