diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pronto/eslint.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pronto/eslint.rb b/lib/pronto/eslint.rb index 67e9229..b6ccff1 100644 --- a/lib/pronto/eslint.rb +++ b/lib/pronto/eslint.rb | |||
@@ -3,10 +3,10 @@ require 'eslintrb' | |||
3 | 3 | ||
4 | module Pronto | 4 | module Pronto |
5 | class ESLint < Runner | 5 | class ESLint < Runner |
6 | def run(patches, _) | 6 | def run |
7 | return [] unless patches | 7 | return [] unless @patches |
8 | 8 | ||
9 | patches.select { |patch| patch.additions > 0 } | 9 | @patches.select { |patch| patch.additions > 0 } |
10 | .select { |patch| js_file?(patch.new_file_full_path) } | 10 | .select { |patch| js_file?(patch.new_file_full_path) } |
11 | .map { |patch| inspect(patch) } | 11 | .map { |patch| inspect(patch) } |
12 | .flatten.compact | 12 | .flatten.compact |
@@ -26,7 +26,7 @@ module Pronto | |||
26 | path = line.patch.delta.new_file[:path] | 26 | path = line.patch.delta.new_file[:path] |
27 | level = :warning | 27 | level = :warning |
28 | 28 | ||
29 | Message.new(path, line, level, offence['message']) | 29 | Message.new(path, line, level, offence['message'], nil, self.class) |
30 | end | 30 | end |
31 | 31 | ||
32 | def js_file?(path) | 32 | def js_file?(path) |