Sha256: 38664a71c506da8074fae8b3ed4b2d31dab44b0c54be574e7ef44b10e4cc2bcc

Contents?: true

Size: 703 Bytes

Versions: 11

Compression:

Stored size: 703 Bytes

Contents

module Quality
  module Tools
    # Adds 'pep8' tool support to quality gem
    module Pep8
      private

      def pep8_args
        python_files.join(' ')
      end

      def quality_pep8
        ratchet_quality_cmd('pep8',
                            args: pep8_args,
                            gives_error_code_on_no_relevant_code:
                              true) do |line|
          if line =~ /^Usage:/
            # no files specified
            0
          elsif line =~ /^pep8: /
            # no files specified
            0
          elsif line =~ /^$/
            # no files specified
            0
          else
            1
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
quality-21.0.6 lib/quality/tools/pep8.rb
quality-21.0.5 lib/quality/tools/pep8.rb
quality-21.0.4 lib/quality/tools/pep8.rb
quality-21.0.3 lib/quality/tools/pep8.rb
quality-21.0.2 lib/quality/tools/pep8.rb
quality-21.0.1 lib/quality/tools/pep8.rb
quality-20.1.1 lib/quality/tools/pep8.rb
quality-21.0.0 lib/quality/tools/pep8.rb
quality-20.1.0 lib/quality/tools/pep8.rb
quality-20.0.3 lib/quality/tools/pep8.rb
quality-20.0.2 lib/quality/tools/pep8.rb