clincha-org / clincha

Configuration and monitoring of clinch-home infrastructure
https://clinch-home.com
1 stars 1 forks source link

Lint yml files (clincha#110) #112

Closed FrankXenarthra closed 10 months ago

FrankXenarthra commented 11 months ago

Linted with yamllint and added .yamllint file. Fixed errors: line-length and brackets Fixed warnings: document-start and truthy Excluded errors: new-line-at-end-of-file and empty-lines Excluded warnings: comments Excluded file: README.md

clincha commented 10 months ago

Thank you for making a PR and contributing! The code is good. However, there is one issue with the line length lint fix you have done. When I try and run the code I get errors becuase the format of file deferrers from how Ansible expects to run it.

When you want a string on two lines you need to use a special character to indicate that the string continues on the next line. This is a good stack overflow post on the different ways you can achieve it. If you don't feel like doing that feel free to exclude that YAML lint check.

Thanks again for contributing, your changes will make the code easier to debug.

FrankXenarthra commented 10 months ago

Hello @clincha , thank you for the chance to contribute to this project. There were no indications from yamllint and ansible-lint but the useful stackoverflow article already mentioned that the plain style is usually a bad idea. I switched now to folded style with > and as far as I understood there should be no line breaks or spaces inside the URLs. I added one exception for a file since the folded style caused a yamllint message about an invalid token. This might could be fixed by moving the password parts to additional files.

Could you check for any further blockings? I appreciate your patience!

FrankXenarthra commented 10 months ago

@clincha I updated the branch with the suggested changes. Could you review this please? Many thanks for the patience!