Ansible-lint and yamllint #32

Merged
Ghost merged 16 commits from linting into dev 2020-06-08 17:14:32 +02:00
First-time contributor

Does not fix all warnings, but gets rid of the purely cosmetic ones.
(roles/accounts/tasks/main.yml)

Does not fix all warnings, but gets rid of the purely cosmetic ones. (roles/accounts/tasks/main.yml)
jdubois approved these changes 2020-06-01 11:39:06 +02:00
Owner

I ran it and fixed a lot of yamlling warnings about truthy variables, indentation and trailing spaces.

I ran it and fixed a lot of yamlling warnings about truthy variables, indentation and trailing spaces.
Ghost approved these changes 2020-06-01 12:03:21 +02:00
Ghost left a comment
Author
First-time contributor

No major changes so okay by me to merge into dev

No major changes so okay by me to merge into dev
Author
First-time contributor

I used to fix those truthy variables, but @jlecour convinced me that as long as the ansible project itself still uses those thuthy variables in the official documentation (and than ansible-lint does not warn about them), we should keep the truthy variables.

The main reason I run both linters is that yamllint is much faster for me than ansiblelint, meaning I can get faster feedback.

I used to fix those truthy variables, but @jlecour convinced me that as long as the ansible project itself still uses those thuthy variables in the official documentation (and than ansible-lint does not warn about them), we should keep the truthy variables. The main reason I run both linters is that yamllint is much faster for me than ansiblelint, meaning I can get faster feedback.
Author
First-time contributor

@jdubois caught so many indentation problems that I think I might have a problem with my linter invocation. It might not be running on every file. Did you run the linters against every file individually ? If not, do you mind sharing your shell glob / find function ?

@jdubois caught so many indentation problems that I think I might have a problem with my linter invocation. It might not be running on every file. Did you run the linters against every file individually ? If not, do you mind sharing your shell glob / find function ?
Author
First-time contributor

But honestly, since this is separate from ansible-roles, I think we can be consistent and use true / false / null instead of True / yes / False / no / Null, it makes no sense anyway.

But honestly, since this is separate from ansible-roles, I think we can be consistent and use true / false / null instead of True / yes / False / no / Null, it makes no sense anyway.
Author
First-time contributor

IMHO since EvoBSD is separate from ansible-roles, you can go our own way on this project. So let's use true / false / null as suggested by the linters.

IMHO since EvoBSD is separate from ansible-roles, you can go our own way on this project. So let's use true / false / null as suggested by the linters.
Owner

I agree with @drustan. And I don't really see the point in keeping to use True / yes / False / no / Null.

@jdubois caught so many indentation problems that I think I might have a problem with my linter invocation. It might not be running on every file. Did you run the linters against every file individually ? If not, do you mind sharing your shell glob / find function ?

@pmarchand, I ran it telling it to scan the entire folder :

~/GIT/EvoBSD$ yamllint ./
I agree with @drustan. And I don't really see the point in keeping to use True / yes / False / no / Null. > @jdubois caught so many indentation problems that I think I might have a problem with my linter invocation. It might not be running on every file. Did you run the linters against every file individually ? If not, do you mind sharing your shell glob / find function ? @pmarchand, I ran it telling it to scan the entire folder : ``` ~/GIT/EvoBSD$ yamllint ./ ```
Author
First-time contributor

I added a ci step so we can get warnings if we forget to lint, but I've yet to finish configuring the webhook so it's not running yet.

I added a ci step so we can get warnings if we forget to lint, but I've yet to finish configuring the webhook so it's not running yet.
Author
First-time contributor

Linting is working now, the other warnings are for stuff that isnt purely cosmetic, I suggest we fix in another branch and merge this one.

Linting is working now, the other warnings are for stuff that isnt purely cosmetic, I suggest we fix in another branch and merge this one.
Author
First-time contributor

Ouf, took me a few tries, but I got rid of all the cosmetic markdown and yaml warnings. I'm going to need you guys to reread the diff until I merge this.

Ouf, took me a few tries, but I got rid of all the cosmetic markdown and yaml warnings. I'm going to need you guys to reread the diff until I merge this.
Owner

I reread the diff, I think it's ok.

I reread the diff, I think it's ok.
Ghost closed this pull request 2020-06-08 17:14:32 +02:00
jdubois deleted branch linting 2020-09-24 16:15:24 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/EvoBSD#32
No description provided.