gnurr 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gnurr +2 -2
- data/lib/gnurr/es_linter.rb +4 -0
- data/lib/gnurr/linter.rb +7 -2
- data/lib/gnurr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa78b2d78a3b56e2bf1769f11659a8969684fd43
|
4
|
+
data.tar.gz: 4b5fac6dd1d3f958deacb31b3446a7eb5adb4485
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1163d4af02b52af01491d6178d3b4582396119a2cfdb66577c73972b5eb9bd60a1a3e7e483442df44629606c310e10ef6b5c69f11bf4ab56c9fda14c18540f33
|
7
|
+
data.tar.gz: 5b6720082446eca030b705ec9b6cb7897c2ae2894e8394114b7f4d9767b59365ff6a466d6de669662d76f34a990a180df7d1cb8cac6e5e4fac8e8ac99895fe77
|
data/bin/gnurr
CHANGED
@@ -12,8 +12,8 @@ options = {
|
|
12
12
|
option_parser = OptionParser.new do |opts|
|
13
13
|
opts.banner = 'Usage: gnurr [options]'
|
14
14
|
|
15
|
-
opts.on('-b', '--
|
16
|
-
'Base
|
15
|
+
opts.on('-b', '--base NAME',
|
16
|
+
'Base reference: branch, SHA, etc for diff (default: master)') do |v|
|
17
17
|
options[:branch] = v
|
18
18
|
end
|
19
19
|
|
data/lib/gnurr/es_linter.rb
CHANGED
data/lib/gnurr/linter.rb
CHANGED
@@ -37,7 +37,9 @@ module Gnurr
|
|
37
37
|
|
38
38
|
def filter_messages(messages)
|
39
39
|
messages.map do |filename, msgs|
|
40
|
-
msgs.reject!
|
40
|
+
msgs.reject! do |msg|
|
41
|
+
!files[relative_filename(filename)].include?(msg[:line])
|
42
|
+
end
|
41
43
|
msgs.empty? ? nil : [filename, msgs]
|
42
44
|
end.reject(&:nil?)
|
43
45
|
end
|
@@ -83,10 +85,13 @@ module Gnurr
|
|
83
85
|
end
|
84
86
|
|
85
87
|
def messages
|
86
|
-
return @messages = {} if files.empty?
|
87
88
|
@messages ||= parse_messages(relevant_messages)
|
88
89
|
end
|
89
90
|
|
91
|
+
def relative_filename(filename)
|
92
|
+
filename
|
93
|
+
end
|
94
|
+
|
90
95
|
def requirements_met?
|
91
96
|
true # Set by subclasses
|
92
97
|
end
|
data/lib/gnurr/version.rb
CHANGED