module Rubocop::Stylecheck::Cli
Public Class Methods
options()
click to toggle source
# File lib/rubocop/stylecheck/cli.rb, line 11 def options options = ["--fail-level", "refactor"] options += ["--rails"] if defined?(Rails) options end
options_with_auto_correct()
click to toggle source
# File lib/rubocop/stylecheck/cli.rb, line 17 def options_with_auto_correct options + ["--auto-correct"] end
options_with_cop()
click to toggle source
# File lib/rubocop/stylecheck/cli.rb, line 21 def options_with_cop options + ["--display-cop-names"] end
run(options)
click to toggle source
# File lib/rubocop/stylecheck/cli.rb, line 5 def run(options) system "bundle exec rubocop #{options.join(' ')}" do |ok, _res| abort "Fix code style errors" unless ok end end