Sha256: 86cbb2b341cab6e08d8dafe8e36ef2e562fce71f4aa087ef0d8a8014a2b681de

Contents?: true

Size: 561 Bytes

Versions: 20

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module Quality
  module Tools
    # Adds 'flay' tool support to quality gem
    class Flay < Tool
      def flay_args
        "--mass 75 --timeout 99999 #{ruby_files.join(' ')}"
      end

      def quality_flay
        ratchet_quality_cmd('flay',
                            args: flay_args,
                            emacs_format: true) do |line|
          if line =~ /^[0-9]*\).* \(mass.* = ([0-9]*)\)$/
            Regexp.last_match[1].to_i
          else
            0
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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