Closed RandomEtc closed 10 years ago
Hmm. I can look into it.
To clarify, do you want the rake task to load a config file, or the coffeelint.rb command?
Ideally I'd like to call from rake like this:
task :coffee do
options = { config_file: 'coffeelint.json' }
success = Coffeelint.run_test_suite('app', options) and Coffeelint.run_test_suite('spec', options)
fail "Lint!" unless success
end
This is to achieve two goals:
The second one is nice-to-have, the first is a show-stopper. Happy to help if you can outline the best way to do it.
Okay. For the moment, I believe that if you read your coffeelint.json file and passed it as the second parameter to Coffeelint.run_test_suite
If that doesn't work, let me know. That will help me gauge how easy/hard this will be to implement. If reading the coffeelint.json file into a hash works then this should be a pretty simple patch.
I just went ahead and implemented the change. Let me know if it works for you.
Thanks for this gem - it's really helping our code quality!
I'm wondering if there's a way to get coffeelint to load a config file? I think all that is handled by coffeelint's
commandline.coffee
, but it looks like you're invokingcoffeelint.coffee
directly, so it might not be an easy addition?