quality 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/lib/quality/rake/task.rb +1 -3
- data/lib/quality/runner.rb +3 -3
- data/lib/quality/tools/cane.rb +5 -14
- 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: 1b89cc87e0008d85924a48bda02f4961cae5889c
|
4
|
+
data.tar.gz: 1f0cea390667836193d156c2bf7fecb7437b27ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc768755c02c1a79eeca1451303ff5abab0dc3f6621eb43fd9b042d7f5a5546bc78539dc6542c8fa2056c7d3b4d829d306d90dd66a4086371587aa3008acce0
|
7
|
+
data.tar.gz: 2327c5405d0f37954c5b40d7bd9e45382ca061cdef59a35ef73cddc22eb3b813ff691fd14274a7c4eba79ee5b2710434af078fee08c44dd85c5352d3f2b2eba7
|
data/Rakefile
CHANGED
data/lib/quality/rake/task.rb
CHANGED
data/lib/quality/runner.rb
CHANGED
@@ -6,6 +6,8 @@ require_relative 'tools/rubocop'
|
|
6
6
|
require_relative 'tools/bigfiles'
|
7
7
|
|
8
8
|
module Quality
|
9
|
+
# Knows how to run different quality tools based on a configuration
|
10
|
+
# already determined.
|
9
11
|
class Runner
|
10
12
|
include Tools::Cane
|
11
13
|
include Tools::Flay
|
@@ -18,14 +20,12 @@ module Quality
|
|
18
20
|
gem_spec: Gem::Specification,
|
19
21
|
quality_checker_class: Quality::QualityChecker,
|
20
22
|
count_io: IO,
|
21
|
-
count_file: File
|
22
|
-
configuration_writer: File)
|
23
|
+
count_file: File)
|
23
24
|
@config = config
|
24
25
|
@gem_spec = gem_spec
|
25
26
|
@quality_checker_class = quality_checker_class
|
26
27
|
@count_io = count_io
|
27
28
|
@count_file = count_file
|
28
|
-
@configuration_writer = configuration_writer
|
29
29
|
end
|
30
30
|
|
31
31
|
def run_quality
|
data/lib/quality/tools/cane.rb
CHANGED
@@ -4,23 +4,14 @@ module Quality
|
|
4
4
|
module Cane
|
5
5
|
private
|
6
6
|
|
7
|
-
def
|
8
|
-
|
9
|
-
file.write("-f #{ruby_files_glob}")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def args
|
14
|
-
['doc-glob', 'style-glob', 'abc-glob']
|
15
|
-
.map { |arg_name| "--#{arg_name} #{ruby_files_glob}" }
|
16
|
-
.join(' ')
|
7
|
+
def cane_args
|
8
|
+
"-f '#{ruby_files_glob}'"
|
17
9
|
end
|
18
10
|
|
19
11
|
def quality_cane
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
emacs_format: true) do |line|
|
12
|
+
ratchet_quality_cmd('cane', gives_error_code_on_violations: true,
|
13
|
+
args: cane_args,
|
14
|
+
emacs_format: true) do |line|
|
24
15
|
if line =~ /\(([0-9]*)\):$/
|
25
16
|
Regexp.last_match[1].to_i
|
26
17
|
else
|
data/lib/quality/version.rb
CHANGED