reek 6.0.5 → 6.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/reek/code_comment.rb +22 -17
- data/lib/reek/version.rb +2 -2
- data/reek.gemspec +0 -1
- metadata +2 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6445aae6ec59ea428c09872ffcf768e6b1df34f7c3860d2537ace1465c3f588
|
4
|
+
data.tar.gz: 81768ea8825add3341a059deba602ce5fd9d58093c4b53b37ede59c2256124b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b27f1243970e103ea742582ae4f0ae517613b0a7465ff953818a069f1c5354626aa1dc2d72d42ad97d47ee930c294ddde5f6987e337f6314fd4f7c8598f75557
|
7
|
+
data.tar.gz: 2a036cd4900a2cc47aaef1fb3aec83c4793c4da44bdcffc6fe12134094fdfe5ede6dfe4509f251051d6703f52a37da0b7bf8e7b17cd6a3c2af616727d87a402f
|
data/CHANGELOG.md
CHANGED
data/lib/reek/code_comment.rb
CHANGED
@@ -39,13 +39,13 @@ module Reek
|
|
39
39
|
|
40
40
|
@original_comment.scan(CONFIGURATION_REGEX) do |detector_name, separator, options|
|
41
41
|
escalate_legacy_separator separator
|
42
|
-
CodeCommentValidator.new(detector_name: detector_name,
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
validator = CodeCommentValidator.new(detector_name: detector_name,
|
43
|
+
original_comment: original_comment,
|
44
|
+
line: line,
|
45
|
+
source: source,
|
46
|
+
options: options)
|
47
|
+
validator.validate
|
48
|
+
@config.merge! detector_name => validator.parsed_options
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -115,6 +115,21 @@ module Reek
|
|
115
115
|
escalate_unknown_configuration_key
|
116
116
|
end
|
117
117
|
|
118
|
+
def parsed_options
|
119
|
+
@parsed_options ||=
|
120
|
+
if Psych::VERSION < '3.1.0'
|
121
|
+
YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION, [Regexp])
|
122
|
+
else
|
123
|
+
YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION,
|
124
|
+
permitted_classes: [Regexp])
|
125
|
+
end
|
126
|
+
rescue Psych::SyntaxError
|
127
|
+
raise Errors::GarbageDetectorConfigurationInCommentError.new(detector_name: detector_name,
|
128
|
+
original_comment: original_comment,
|
129
|
+
source: source,
|
130
|
+
line: line)
|
131
|
+
end
|
132
|
+
|
118
133
|
private
|
119
134
|
|
120
135
|
attr_reader :detector_name,
|
@@ -124,16 +139,6 @@ module Reek
|
|
124
139
|
:separator,
|
125
140
|
:options
|
126
141
|
|
127
|
-
def parsed_options
|
128
|
-
@parsed_options ||= YAML.safe_load(options || CodeComment::DISABLE_DETECTOR_CONFIGURATION,
|
129
|
-
permitted_classes: [Regexp])
|
130
|
-
rescue Psych::SyntaxError
|
131
|
-
raise Errors::GarbageDetectorConfigurationInCommentError.new(detector_name: detector_name,
|
132
|
-
original_comment: original_comment,
|
133
|
-
source: source,
|
134
|
-
line: line)
|
135
|
-
end
|
136
|
-
|
137
142
|
def escalate_unknown_configuration_key
|
138
143
|
return if given_keys_legit?
|
139
144
|
|
data/lib/reek/version.rb
CHANGED
data/reek.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-08-
|
14
|
+
date: 2021-08-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: kwalify
|
@@ -41,26 +41,6 @@ dependencies:
|
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 3.0.0
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: psych
|
46
|
-
requirement: !ruby/object:Gem::Requirement
|
47
|
-
requirements:
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '3.1'
|
51
|
-
- - "<"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '5.0'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '3.1'
|
61
|
-
- - "<"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '5.0'
|
64
44
|
- !ruby/object:Gem::Dependency
|
65
45
|
name: rainbow
|
66
46
|
requirement: !ruby/object:Gem::Requirement
|