quality 19.0.0 → 19.1.0
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 -2
- 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: 8b1005d9138ff199aa6b30266feb8a1273419d00
|
4
|
+
data.tar.gz: 42e1b3005f5df53436b91083a150203a946fae2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24bea6506533168615fef845284cf953433ad056c7664788e034a73bab0d5a6bab80f468b1abae448327f80e8f2378120409968bb9ec5fce4b0d8a9b183a2633
|
7
|
+
data.tar.gz: cc81ad10319033514e23943478f231ec25498f519c160dbc83f87fff20eedfc107103876751002d84b3b2dd46fd2b85d09b86877f75ea34faa0721bb23311b81
|
data/lib/quality/tools/jscs.rb
CHANGED
@@ -8,12 +8,21 @@ module Quality
|
|
8
8
|
'-r unix ' + js_files_arr.join(' ')
|
9
9
|
end
|
10
10
|
|
11
|
+
def jscs_check_configured
|
12
|
+
return if js_files_arr.empty?
|
13
|
+
|
14
|
+
puts 'No JSCS config found! To generate one, run ' \
|
15
|
+
'jscs --autoconfigure ' + js_files_arr.join(' ')
|
16
|
+
0
|
17
|
+
end
|
18
|
+
|
11
19
|
def quality_jscs
|
12
20
|
ratchet_quality_cmd('jscs',
|
13
21
|
args: jscs_args,
|
14
22
|
gives_error_code_on_violations: true) do |line|
|
15
|
-
if line =~ /^.*:\d+:\d+: /
|
16
|
-
|
23
|
+
return 1 if line =~ /^.*:\d+:\d+: /
|
24
|
+
if line =~ /^No configuration found/
|
25
|
+
jscs_check_configured
|
17
26
|
else
|
18
27
|
0
|
19
28
|
end
|
data/lib/quality/version.rb
CHANGED