Sha256: ae1082ca860062696f267649ce78780ec25ffbe354e7f4fe8d31f3c9a7f46244

Contents?: true

Size: 632 Bytes

Versions: 20

Compression:

Stored size: 632 Bytes

Contents

# frozen_string_literal: true

module Quality
  module Tools
    # Adds 'reek' tool support to quality gem
    class Reek < Tool
      def quality_reek
        args = "--single-line #{ruby_files.join(' ')}"
        ratchet_quality_cmd('reek',
                            args: args,
                            emacs_format: true,
                            gives_error_code_on_violations: true) do |line|
          self.class.count_reek_violations(line)
        end
      end

      def self.count_reek_violations(line)
        if line =~ /^  .* (.*)$/
          1
        else
          0
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
quality-40.0.1 lib/quality/tools/reek.rb
quality-40.0.0 lib/quality/tools/reek.rb
quality-39.0.1 lib/quality/tools/reek.rb
quality-38.0.1 lib/quality/tools/reek.rb
quality-38.0.0 lib/quality/tools/reek.rb
quality-37.1.1 lib/quality/tools/reek.rb
quality-37.1.0 lib/quality/tools/reek.rb
quality-37.0.1 lib/quality/tools/reek.rb
quality-37.0.0 lib/quality/tools/reek.rb
quality-36.1.0 lib/quality/tools/reek.rb
quality-36.0.0 lib/quality/tools/reek.rb
quality-35.2.1 lib/quality/tools/reek.rb
quality-35.2.0 lib/quality/tools/reek.rb
quality-35.1.1 lib/quality/tools/reek.rb
quality-35.0.1 lib/quality/tools/reek.rb
quality-35.0.0 lib/quality/tools/reek.rb
quality-34.0.2 lib/quality/tools/reek.rb
quality-34.0.1 lib/quality/tools/reek.rb
quality-34.0.0 lib/quality/tools/reek.rb
quality-33.0.0 lib/quality/tools/reek.rb