quality 19.1.1 → 19.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/quality/tools/jscs.rb +11 -6
- data/lib/quality/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: 98272ba9fc1a96739f2910b12293e49bc99e4ecc
|
4
|
+
data.tar.gz: 7a757fec68b3cb360dff46ebc66bc8a6fed324f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a2fd024e943cd144ddbe63535384bfc9a835857c6ced7ca8335fea388ca3117822b6eec91a26448d15e03110881f1401831a6077865f2969a361ebdfc473eb
|
7
|
+
data.tar.gz: df3412d7004e3bdf3b16746ee9ea94c5795dabfe76db4243b83d4969cede7f5ad330759bd2b0a1a8c581af9e7fa2d4d56f84e8ca0129e830aaad9fd30cb534f2
|
data/lib/quality/tools/jscs.rb
CHANGED
@@ -16,16 +16,21 @@ module Quality
|
|
16
16
|
0
|
17
17
|
end
|
18
18
|
|
19
|
+
def jscs_count_violations_on_line(line)
|
20
|
+
if line =~ /^.*:\d+:\d+: /
|
21
|
+
1
|
22
|
+
elsif line =~ /^No configuration found/
|
23
|
+
jscs_check_configured
|
24
|
+
else
|
25
|
+
0
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
19
29
|
def quality_jscs
|
20
30
|
ratchet_quality_cmd('jscs',
|
21
31
|
args: jscs_args,
|
22
32
|
gives_error_code_on_violations: true) do |line|
|
23
|
-
|
24
|
-
if line =~ /^No configuration found/
|
25
|
-
jscs_check_configured
|
26
|
-
else
|
27
|
-
0
|
28
|
-
end
|
33
|
+
jscs_count_violations_on_line(line)
|
29
34
|
end
|
30
35
|
end
|
31
36
|
end
|
data/lib/quality/version.rb
CHANGED