Closed usev6 closed 5 years ago
Thanks @usev6, can you add a test to spec/puppet-lint/bin_spec.rb
for this behaviour?
Yes, adding a test for this behaviour makes a lot of sense. I'll try to come up with something later today.
I have to admit, that I don't have much experience with rspec. But I think the test I added should work. I thought about doing the whole test in a temporary directory, because that would allow to create a .puppet-lint.rc
file unconditionally. Or would there even be a way to mock the reading of options from ~/.puppet-lint.rc
?
Thanks for that @usev6, I refactored the test a bit to run the test inside a temporary directory (removing the need for the .puppet-lint.rc
existence check)
@rodjek thanks for cleaning up the test. And while I'm at it: Thanks for puppet-lint. Also the tutorial at http://puppet-lint.com/developer/tutorial/ was very helpful and made writing two small plugins very easy -- though I never wrote a gem before.
Arguments given on the command line should override those from config files. That implies that config files must be read first. Only peeking into the command line args can show if config files should be used at all.
This change might break existing setups.
Fixes #879.