Sha256: bb42d40b3058ecd01de16b0ab1e74e5d88a423c033b989c42d77154ecb383831
Contents?: true
Size: 843 Bytes
Versions: 20
Compression:
Stored size: 843 Bytes
Contents
# frozen_string_literal: true module Quality module Tools # Adds 'pycodestyle' tool support to quality gem class Pycodestyle < Tool def pycodestyle_args python_files.join(' ') end def pycodestyle_count_errors(line) if line =~ /^Usage:/ # no files specified 0 elsif line =~ /^pycodestyle: / # no files specified 0 elsif line =~ /^$/ # no files specified 0 else 1 end end def quality_pycodestyle ratchet_quality_cmd('pycodestyle', args: pycodestyle_args, gives_error_code_on_no_relevant_code: true) do |line| pycodestyle_count_errors(line) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems