Sha256: de9f4e07b8bf2b83a3e5bc53c6354456c186d2776e0c16a9aa19172443b38a6a

Contents?: true

Size: 755 Bytes

Versions: 23

Compression:

Stored size: 755 Bytes

Contents

module Quality
  module Tools
    # Adds 'reek' tool support to quality gem
    module Reek
      private

      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.included(base)
        base.extend ClassMethods
      end

      # See Reek.included
      module ClassMethods
        def count_reek_violations(line)
          if line =~ /^  .* (.*)$/
            1
          else
            0
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
quality-20.1.0 lib/quality/tools/reek.rb
quality-20.0.3 lib/quality/tools/reek.rb
quality-20.0.2 lib/quality/tools/reek.rb
quality-20.0.1 lib/quality/tools/reek.rb
quality-20.0.0 lib/quality/tools/reek.rb
quality-19.2.1 lib/quality/tools/reek.rb
quality-19.2.0 lib/quality/tools/reek.rb
quality-19.1.3 lib/quality/tools/reek.rb
quality-19.1.2 lib/quality/tools/reek.rb
quality-19.1.1 lib/quality/tools/reek.rb
quality-19.1.0 lib/quality/tools/reek.rb
quality-19.0.0 lib/quality/tools/reek.rb
quality-18.0.1 lib/quality/tools/reek.rb
quality-18.0.0 lib/quality/tools/reek.rb
quality-17.2.0 lib/quality/tools/reek.rb
quality-17.1.1 lib/quality/tools/reek.rb
quality-17.1.0 lib/quality/tools/reek.rb
quality-17.0.0 lib/quality/tools/reek.rb
quality-16.0.1 lib/quality/tools/reek.rb
quality-16.0.0 lib/quality/tools/reek.rb