Sha256: 7d4102c0cdb91cdf724608c68a6b187f899f7be3c7cc45fc6ddd1d8e963f345e

Contents?: true

Size: 547 Bytes

Versions: 15

Compression:

Stored size: 547 Bytes

Contents

module Quality
  module Tools
    # Adds 'cane' tool support to quality gem
    module Cane
      private

      def cane_args
        "-f '#{ruby_files_glob}'"
      end

      def quality_cane
        ratchet_quality_cmd('cane', gives_error_code_on_violations: true,
                                    args: cane_args,
                                    emacs_format: true) do |line|
          if line =~ /\(([0-9]*)\):$/
            Regexp.last_match[1].to_i
          else
            0
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
quality-14.0.0 lib/quality/tools/cane.rb
quality-13.0.0 lib/quality/tools/cane.rb
quality-12.0.0 lib/quality/tools/cane.rb
quality-11.0.0 lib/quality/tools/cane.rb
quality-10.0.0 lib/quality/tools/cane.rb
quality-9.0.0 lib/quality/tools/cane.rb
quality-8.1.1 lib/quality/tools/cane.rb
quality-8.1.0 lib/quality/tools/cane.rb
quality-8.0.0 lib/quality/tools/cane.rb
quality-7.0.0 lib/quality/tools/cane.rb
quality-6.0.0 lib/quality/tools/cane.rb
quality-5.0.1 lib/quality/tools/cane.rb
quality-5.0.0 lib/quality/tools/cane.rb
quality-4.0.2 lib/quality/tools/cane.rb
quality-4.0.1 lib/quality/tools/cane.rb