Sha256: e00b223decda37b384c47fe83c34b861af3d5b280b0ebfba8691cecaea097711

Contents?: true

Size: 570 Bytes

Versions: 30

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

module Quality
  module Tools
    # Adds 'flay' tool support to quality gem
    module Flay
      private

      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

30 entries across 30 versions & 1 rubygems

Version Path
quality-25.0.0 lib/quality/tools/flay.rb
quality-24.0.0 lib/quality/tools/flay.rb
quality-23.0.7 lib/quality/tools/flay.rb
quality-23.0.6 lib/quality/tools/flay.rb
quality-23.0.5 lib/quality/tools/flay.rb
quality-23.0.4 lib/quality/tools/flay.rb
quality-23.0.3 lib/quality/tools/flay.rb
quality-23.0.2 lib/quality/tools/flay.rb
quality-23.0.1 lib/quality/tools/flay.rb
quality-23.0.0 lib/quality/tools/flay.rb