lib/ruumba/analyzer.rb
# The regular expression to capture interpolated Ruby.
The regular expression to capture interpolated Ruby.
The regular expression to capture interpolated Ruby .
def run_rubocop(target, tmp)
      args = ['rubocop'] + (@options[:arguments] || []) + [target.to_s]
      todo = tmp + '.rubocop_todo.yml'
      pwd = ENV['PWD']
      replacements = []
      replacements << [/^#{Regexp.quote(tmp.to_s)}/, pwd]
      unless @options[:disable_rb_extension]
        replacements << [/\.erb\.rb/, '.erb']
      end
      result = Dir.chdir(tmp) do
        stdout, stderr, status = Open3.capture3(*args)
        munge_output(stdout, stderr, replacements)
        status.exitstatus
      end
      FileUtils.cp(todo, pwd) if File.exist?(todo)
      FileUtils.rm_rf(tmp) unless @options[:tmp_folder]
      result
    end
def run_rubocop ( target , tmp ) args = [ 'rubocop' ] + ( @options [ :arguments ] || [ ] ) + [ target . to_s ] todo = tmp + '.rubocop_todo.yml' pwd = ENV [ 'PWD' ] replacements = [ ] replacements << [ / ^ #{ Regexp . quote ( tmp . to_s ) } / , pwd ] unless @options [ :disable_rb_extension ] replacements << [ / \. erb \. rb / , '.erb' ] end result = Dir . chdir ( tmp ) do stdout , stderr , status = Open3 . capture3 ( * args ) munge_output ( stdout , stderr , replacements ) status . exitstatus end FileUtils . cp ( todo , pwd ) if File . exist? ( todo ) FileUtils . rm_rf ( tmp ) unless @options [ :tmp_folder ] result end
The regular expression to capture interpolated Ruby.
The regular expression to capture interpolated Ruby .
target
<not_specific>
tmp
<not_specific>