-
Notifications
You must be signed in to change notification settings - Fork 654
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
Expand environment vars and ~ #672
Conversation
Looks like the 🚨 / lint/2.7@ubuntu-16.04 (pull_request) test is failing in general. It failed because tox was missing in the test not because of my code, and it looks like it failed on another recent PR. |
Yes, please ignore that failing jobs. I haven't had time to figure out what's causing that failure. Maybe it's because of recent releases of ecosystem-level dists. |
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.
Mind adding a test for this behavior?
I did a bunch of refactoring. I broke out the expansion code to the utils module so it can be reused. I also change the RulesCollection class to work more like the Runner class and setup the rulesdir on class creation rather than having to use a class method after the creation. I couldn't see why it was done that way but this way seemed cleaner. I can clean up the tests to use the new methodology. |
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
Signed-off-by: Dan Mills <evilhamsterman@gmail.com>
@webknjaz I believe I've made all the changes you requested |
@@ -22,15 +22,15 @@ | |||
import unittest | |||
|
|||
import ansiblelint | |||
from ansiblelint import Runner, RulesCollection | |||
from ansiblelint import default_rulesdir, Runner, RulesCollection |
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.
I'm not sure if using this var makes sense in tests but let's keep it.
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.
The default_rules is the same as what the the setup in the class was doing.
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.
Yep, I just think that we could be testing a more generic case or many cases w/o depending on this.
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.
LGTM
Thanks for the PR @evilhamsterman! I'll merge it soon. |
Signed-off-by: Dan Mills evilhamsterman@gmail.com
Simply adds the ability to expand environment vars and ~ in the exclude and rulesdirs config. This could close #541 by allowing you to easily exclude the traditional galaxy roles directory with the following