Skip to content
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

init changelog config should be in proper yaml #91

Closed
sean-m-sullivan opened this issue Nov 30, 2022 · 8 comments · Fixed by #160
Closed

init changelog config should be in proper yaml #91

sean-m-sullivan opened this issue Nov 30, 2022 · 8 comments · Fixed by #160

Comments

@sean-m-sullivan
Copy link

sean-m-sullivan commented Nov 30, 2022

Added changelog to a new collection then ran ansible-lint against it. Had the following errors:

WARNING  Listing 5 violation(s) that are fatal
changelogs/config.yaml:1: yaml[document-start]: Missing document start "---"
changelogs/config.yaml:14: yaml[indentation]: Wrong indentation: expected 2 but found 0
changelogs/config.yaml:32: yaml[document-end]: Missing document end "..."
Error: Missing document start "---"
Error: Wrong indentation: expected 2 but found 0
Error: Missing document end "..."

This should be updated to be proper yaml.

@felixfontein
Copy link
Collaborator

How do you define "proper YAML"? All YAML parsers I know off don't require the above things your linter mentioned.

@sean-m-sullivan
Copy link
Author

Let me check it on whats enabled in ansible-lint Prod profile, as this is an Ansible Tool, that is what it should adhere to.

@djdanielsson
Copy link

its in our yaml lint rules

@felixfontein
Copy link
Collaborator

Closing since this seems more like a problem with ansible-lint or yamllint.

@felixfontein felixfontein closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2022
@gotmax23
Copy link
Contributor

gotmax23 commented Dec 1, 2022

We use PyYAML to dump yaml files. The indentation linting errors are from that. ruamel.yaml does handle this properly, but I don't think this on its own is a compelling reason to switch yaml libraries and pull in another dependency. Fix these linting errors by hand if you'd like or just add that file to the linter's ignore list. The file is still perfectly valid yaml.

It would be trivial to add --- document starts, though. @felixfontein, wdyt?

@felixfontein
Copy link
Collaborator

I don't see why it is necessary, but that would be possible.

@sean-m-sullivan
Copy link
Author

Let me get back to this, as I think some of it was our own rules, and some of it was ansible lint. if its done with the pyaml dump thats fine, just thought we should be putting out things that eat our own dogfood with ansilbe-lint.

@djdanielsson
Copy link

the requirement of the --- and ... is in our rules because it is correct yaml syntax but is not part of the production profile so I think it is most likely fine to just leave it how it is because most people don't seem to care about requiring --- and ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants