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
Apply var-spacing tests to vars files #2063
Conversation
8a50c18
to
9f72276
Compare
eco test is failing, but this is correctly detected lint error. I sent PR to fix this to debops repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok but it does not include a positive and negative test, something essential for adding it. Can you please add one?
@ssbarnea Thank you for your comment. I'm adding tests, but I found a problem that |
d5651fa
to
2fe69d4
Compare
2fe69d4
to
46d5494
Compare
I added test for vars file, and fixed the code to make @ssbarnea Could you please review again? |
@notok @cognifloyd When making behavior change it is likely for the eco pipeline to fail as the output of linting on those repos will be different. What you need to do is to run locally I did it for you but I wanted to mention it for future changes. This gives us the opportunity to spot if the changed behavior is buggy or not. |
@ssbarnea Thanks for your help. I now understood how to. I will do it next time. |
Currently, var-spacing rules are applied only to variables on tasks.
I think the rule should also be applied to vars files (like files in role/defaults/).
I wrote the code referring var-naming rule code.
Line numbers could not be obtained when usingadded jq-style path to the variable.matchyaml
, soBut the code may be a bit tricky. Any suggestions are welcome.
Fixed code to get line number from
AnsibleUnicode
.