Sha256: e4af81e7f4da00747da53dcdd32b7955215c41deeb6f170deb3fbf582e11d548

Contents?: true

Size: 745 Bytes

Versions: 23

Compression:

Stored size: 745 Bytes

Contents

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

      def quality_reek
        args = "--single-line #{ruby_files}"
        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-14.0.0 lib/quality/tools/reek.rb
quality-13.0.0 lib/quality/tools/reek.rb
quality-12.0.0 lib/quality/tools/reek.rb
quality-11.0.0 lib/quality/tools/reek.rb
quality-10.0.0 lib/quality/tools/reek.rb
quality-9.0.0 lib/quality/tools/reek.rb
quality-8.1.1 lib/quality/tools/reek.rb
quality-8.1.0 lib/quality/tools/reek.rb
quality-8.0.0 lib/quality/tools/reek.rb
quality-7.0.0 lib/quality/tools/reek.rb
quality-6.0.0 lib/quality/tools/reek.rb
quality-5.0.1 lib/quality/tools/reek.rb
quality-5.0.0 lib/quality/tools/reek.rb
quality-4.0.2 lib/quality/tools/reek.rb
quality-4.0.1 lib/quality/tools/reek.rb
quality-4.0.0 lib/quality/tools/reek.rb
quality-3.1.0 lib/quality/tools/reek.rb
quality-3.0.0 lib/quality/tools/reek.rb
quality-2.1.1 lib/quality/tools/reek.rb
quality-2.1.0 lib/quality/tools/reek.rb