atomic-host-tests icon indicating copy to clipboard operation
atomic-host-tests copied to clipboard

Run yamllint as a part of the PR tester

Open mike-nguyen opened this issue 8 years ago • 7 comments

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.

mike-nguyen avatar Dec 19 '17 18:12 mike-nguyen

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..

jlebon avatar Dec 19 '17 19:12 jlebon

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

miabbott avatar Dec 19 '17 19:12 miabbott

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

mike-nguyen avatar Dec 19 '17 22:12 mike-nguyen

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.

miabbott avatar Dec 20 '17 14:12 miabbott

#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.

mike-nguyen avatar Jan 17 '18 21:01 mike-nguyen

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

---
extends: default

rules:
  linelength: 90

miabbott avatar Jan 17 '18 21:01 miabbott

I found this to work. Noting for future reference.

---    
extends: default

rules:
  line-length:
    max: 90

mike-nguyen avatar Feb 16 '18 15:02 mike-nguyen