quality 23.0.7 → 24.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd65945bd7c35435a89f463fdd85f22e8230ba3e
|
4
|
+
data.tar.gz: a3c9d4c3e91eaf36dc41be20894093f1b10e8bb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e037c248b2141330bb307387325cf761f8036e10e91f18785386d219de891eb3ada221670bafa47fffcbe74f3109f21f9b8b8e356f6a132d6310d3dc12949c89
|
7
|
+
data.tar.gz: c61ab972f3fbdd7a58c9304a1eeb210c75f4016f3911645f8d72888c0b205aa59b5ea45505e45817d7096b86b0905b6987d8ed655ddaf24c676e161abd7ddf4c
|
@@ -28,7 +28,7 @@ module Quality
|
|
28
28
|
out
|
29
29
|
end
|
30
30
|
|
31
|
-
def process_line
|
31
|
+
def process_line(&block)
|
32
32
|
output =
|
33
33
|
if emacs_format
|
34
34
|
preprocess_line_for_emacs
|
@@ -36,7 +36,11 @@ module Quality
|
|
36
36
|
@current_line
|
37
37
|
end
|
38
38
|
@found_output = true
|
39
|
-
@violations +=
|
39
|
+
@violations += if block
|
40
|
+
yield @current_line
|
41
|
+
else
|
42
|
+
1
|
43
|
+
end
|
40
44
|
output
|
41
45
|
end
|
42
46
|
|
data/lib/quality/config.rb
CHANGED
@@ -15,9 +15,15 @@ module Quality
|
|
15
15
|
|
16
16
|
extend Forwardable
|
17
17
|
|
18
|
-
def_delegators(:@source_file_globber,
|
19
|
-
:
|
20
|
-
:
|
18
|
+
def_delegators(:@source_file_globber,
|
19
|
+
:ruby_files,
|
20
|
+
:python_files,
|
21
|
+
:js_files,
|
22
|
+
:shell_files,
|
23
|
+
:source_and_doc_files,
|
24
|
+
:source_files,
|
25
|
+
:exclude_files=,
|
26
|
+
:exclude_files)
|
21
27
|
|
22
28
|
def to_glob(files)
|
23
29
|
"{#{files.join(',')}}"
|
data/lib/quality/runner.rb
CHANGED
@@ -79,17 +79,20 @@ module Quality
|
|
79
79
|
existing_violations
|
80
80
|
end
|
81
81
|
|
82
|
+
def command_name(ancestor, name)
|
83
|
+
if ancestor.respond_to? :command_name
|
84
|
+
ancestor.command_name
|
85
|
+
else
|
86
|
+
name
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
82
90
|
def tools
|
83
91
|
self.class.ancestors.map do |ancestor|
|
84
92
|
ancestor_name = ancestor.to_s
|
85
93
|
next unless ancestor_name.start_with?('Quality::Tools::')
|
86
94
|
name = ancestor.to_s.split('::').last.underscore
|
87
|
-
command_name
|
88
|
-
ancestor.command_name
|
89
|
-
else
|
90
|
-
name
|
91
|
-
end
|
92
|
-
[name, command_name]
|
95
|
+
[name, command_name(ancestor, name)]
|
93
96
|
end.compact
|
94
97
|
end
|
95
98
|
|
@@ -106,6 +109,7 @@ module Quality
|
|
106
109
|
def_delegators :@config,
|
107
110
|
:ruby_files,
|
108
111
|
:python_files,
|
112
|
+
:shell_files,
|
109
113
|
:source_files,
|
110
114
|
:source_files_glob,
|
111
115
|
:source_and_doc_files,
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Quality
|
4
|
+
module Tools
|
5
|
+
# Adds 'ShellCheck' tool support to quality gem
|
6
|
+
module Shellcheck
|
7
|
+
private
|
8
|
+
|
9
|
+
def shellcheck_args
|
10
|
+
"-fgcc -sbash #{shell_files.join(' ')}"
|
11
|
+
end
|
12
|
+
|
13
|
+
def quality_shellcheck
|
14
|
+
ratchet_quality_cmd('shellcheck',
|
15
|
+
args: shellcheck_args,
|
16
|
+
gives_error_code_on_no_relevant_code: true,
|
17
|
+
gives_error_code_on_violations: true)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/quality/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quality
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 24.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -336,6 +336,7 @@ files:
|
|
336
336
|
- lib/quality/tools/rails_best_practices.rb
|
337
337
|
- lib/quality/tools/reek.rb
|
338
338
|
- lib/quality/tools/rubocop.rb
|
339
|
+
- lib/quality/tools/shellcheck.rb
|
339
340
|
- lib/quality/version.rb
|
340
341
|
- lib/quality/which.rb
|
341
342
|
- quality.gemspec
|