Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Run yamllint as a part of the PR tester #300

Open
mike-nguyen opened this issue Dec 19, 2017 · 7 comments
Open

Run yamllint as a part of the PR tester #300

mike-nguyen opened this issue Dec 19, 2017 · 7 comments

Comments

@mike-nguyen
Copy link
Collaborator

In #297 and #299 yes/no values should be quoted or true/false should be used instead. These issues were identified by yamllint.

Lets run yamllint as part of the PR testing so ansible playbooks/roles are compliant.

@jlebon
Copy link
Contributor

jlebon commented Dec 19, 2017

That makes sense to me. I'd even say let's mark it as required and hook up Homu to this repo? Even though it's only a linter, hooking up Homu still gets you e.g. auto-squashing, delegation, etc..

@miabbott
Copy link
Collaborator

@mike-nguyen any reservations about using Homu? Seems like we are overdue.

@mike-nguyen
Copy link
Collaborator Author

Not at all. We are like barbarians pushing this squash and merge button.

@miabbott miabbott added the jira label Dec 20, 2017
@miabbott
Copy link
Collaborator

I just ran yamllint with the defaults against the tests directory and there is a mountain of warnings/errors to address. So before we turn on the linter, let's make sure we have the existing violations sorted out.

@mike-nguyen
Copy link
Collaborator Author

#302 Addressed many of the yamllint errors but there were some lines that couldn't be easily shortened to the 80 character limit. We could setup our own yamllint rules for make exceptions for line length.

@miabbott
Copy link
Collaborator

Probably need something like this in a yamllint.cfg file:

---
extends: default

rules:
  linelength: 90

@mike-nguyen
Copy link
Collaborator Author

mike-nguyen commented Feb 16, 2018

I found this to work. Noting for future reference.

---    
extends: default

rules:
  line-length:
    max: 90

@miabbott miabbott removed the jira label Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants