lib/quality/tools/pep8.rb in quality-20.0.1 vs lib/quality/tools/pep8.rb in quality-20.0.2
- old
+ new
@@ -11,10 +11,21 @@
def quality_pep8
ratchet_quality_cmd('pep8',
args: pep8_args,
gives_error_code_on_no_relevant_code:
true) do |line|
- line.split(':')[0].to_i
+ 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