Method: Codeqa::Checkers::Rubocop#check
- Defined in:
- lib/codeqa/checkers/rubocop_full.rb
#check ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/codeqa/checkers/rubocop_full.rb', line 22 def check return unless self.class.rubocop? with_existing_file do |filename| args = config_args << filename success, raw_json = capture do if defined?(RuboCop) # its RuboCop since 0.24 ::RuboCop::CLI.new.run(default_args + args) == 0 else ::Rubocop::CLI.new.run(default_args + args) == 0 end end handle_rubocop_results(raw_json) unless success end end |