Open kazuooooo opened 6 years ago
@kazuooooo I think you can simply call like
analyzer = RailsBestPractices::Analyzer.new(path, options)
analyzer.analyze
# analyzer.runner.errors.empty? if true, there's no violation.
A PR to create CLI class is welcome
@filiptepper Thank you for your reply!
Yes, but to call this method, it need option parse like in command.rb
analyzer = RailsBestPractices::Analyzer.new(path, options)
I'll try to create CLI class, thank you 👍
Hi, I'm making rails_best_practices plugin for pre-commit gem.
So, I want to call rails_best_practices checks from program like this code. https://github.com/jish/pre-commit/blob/master/lib/plugins/pre_commit/checks/rubocop.rb#L32
I check command.rb file and it looks it can't be called from program.
Are there some way to call from program? or if it need CLI class, I'm glad to make it :)
thanks,