greener 0.0.1.1 → 0.0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/greener/config_store.rb +1 -1
- data/lib/greener/custom_error.rb +4 -0
- data/lib/greener/linter.rb +9 -3
- data/lib/greener/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: 4a4c2f033e269791bfbef80978c096695c6847f2
|
4
|
+
data.tar.gz: 7647963368a1e66d16664b7660c40979b5fb560e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41e90af06a1f0355c7499a833aaf30bc1c30c633659b769f0dc8c102707916c199e5a4ba117d99c3ddb47fce7e8d3602629fce1898992c9f1539ba7bc9a18792
|
7
|
+
data.tar.gz: 733319f7a35759b6017c23c7443dc9df85df46daafa862cc091bdaab7f3c3384f12696c286a28df33fccae7705d290b8d7622011635b85270f9357f23479412a
|
data/lib/greener/config_store.rb
CHANGED
@@ -84,7 +84,7 @@ module Greener
|
|
84
84
|
|
85
85
|
hash["Include"].each { |glob| includes += files_matching_glob(glob) } if hash["Include"]
|
86
86
|
hash["Exclude"].each { |glob| excludes += files_matching_glob(glob) } if hash["Exclude"]
|
87
|
-
@files = includes - excludes
|
87
|
+
@files = (includes - excludes).uniq
|
88
88
|
end
|
89
89
|
|
90
90
|
def default_absolute_path
|
data/lib/greener/custom_error.rb
CHANGED
data/lib/greener/linter.rb
CHANGED
@@ -30,9 +30,7 @@ module Greener
|
|
30
30
|
puts ""
|
31
31
|
end
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
puts "#{@config.files.count} file(s) inspected, #{conclusion}"
|
33
|
+
print_final_line
|
36
34
|
end
|
37
35
|
|
38
36
|
private
|
@@ -49,5 +47,13 @@ module Greener
|
|
49
47
|
@results += checker.violations
|
50
48
|
end
|
51
49
|
end
|
50
|
+
|
51
|
+
def print_final_line
|
52
|
+
conclusion = @results.empty? ? "no offenses detected" : "#{@results.count} offense(s) detected"
|
53
|
+
|
54
|
+
res = "#{@config.files.count} file(s) inspected, #{conclusion}"
|
55
|
+
return puts(res) if @results.empty?
|
56
|
+
fail Greener::Error::LintFailed, res
|
57
|
+
end
|
52
58
|
end
|
53
59
|
end
|
data/lib/greener/version.rb
CHANGED