We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
::RuboCop::CLI.new.run(args) == 0
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,
The text was updated successfully, but these errors were encountered:
@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
Sorry, something went wrong.
@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 👍
No branches or pull requests
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,
The text was updated successfully, but these errors were encountered: