rubocop-minitest 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +15 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +8 -7
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/README.md +16 -0
- data/docs/modules/ROOT/pages/cops.adoc +12 -1
- data/docs/modules/ROOT/pages/cops_minitest.adoc +1 -1
- data/lib/rubocop/cop/minitest/refute_equal.rb +1 -1
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +1 -1
- data/lib/rubocop/minitest/version.rb +8 -1
- data/relnotes/v0.10.2.md +5 -0
- data/rubocop-minitest.gemspec +3 -3
- data/tasks/cops_documentation.rake +15 -293
- metadata +16 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ad49b7b1f0f0d916cb20400f58ea616d13663e99a57719d9b4a8a373a859a5d
|
4
|
+
data.tar.gz: c69990256d72a503f7bf072273fe077f7c2eea32fd6c7f13b2f2fe83f18c8780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6899f78263d3d2728d5f0074d36c6813b8392d910524193f871ef1313af59fc78270ddb7ffa8b5b11c83c6c6f9bc6f0a8e57203dd54ffb3d81f1b036b025913
|
7
|
+
data.tar.gz: c402e470711d7432317c48c19c64e3b27c701855ceea1557abcf8418e6dd5ecfa33b0433372f9a73fa58ab956989aed7fbdb6b8f227e16b32272d9813d29c5d3
|
data/.circleci/config.yml
CHANGED
@@ -20,9 +20,24 @@ jobs:
|
|
20
20
|
- run: bundle install
|
21
21
|
- run: bundle exec rake
|
22
22
|
|
23
|
+
# Miscellaneous tasks
|
24
|
+
documentation-checks:
|
25
|
+
docker:
|
26
|
+
- image: circleci/ruby
|
27
|
+
steps:
|
28
|
+
- checkout
|
29
|
+
- run: bundle install
|
30
|
+
- run:
|
31
|
+
name: Check documentation syntax
|
32
|
+
command: bundle exec rake documentation_syntax_check
|
33
|
+
- run:
|
34
|
+
name: Build documentation and verify that doc files are in sync
|
35
|
+
command: bundle exec rake verify_cops_documentation
|
36
|
+
|
23
37
|
workflows:
|
24
38
|
build:
|
25
39
|
jobs:
|
40
|
+
- documentation-checks
|
26
41
|
- rake_default:
|
27
42
|
name: Ruby 2.4
|
28
43
|
image: circleci/ruby:2.4
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-10-29 02:01:16 UTC using RuboCop version 1.0.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
|
11
|
-
Max: 17
|
12
|
-
|
13
|
-
# Offense count: 19
|
14
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
9
|
+
# Offense count: 22
|
10
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
15
11
|
Metrics/MethodLength:
|
16
12
|
Max: 14
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
Style/DocumentDynamicEvalDefinition:
|
16
|
+
Exclude:
|
17
|
+
- 'lib/rubocop/cop/mixin/minitest_cop_rule.rb'
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 0.10.2 (2020-12-27)
|
6
|
+
|
7
|
+
### Bug fixes
|
8
|
+
|
9
|
+
* [#113](https://github.com/rubocop-hq/rubocop-minitest/issues/113): This PR fixes an error for `Minitest/AssertEqual` and some cops when using `assert` with block argument. ([@koic][])
|
10
|
+
|
5
11
|
## 0.10.1 (2020-07-25)
|
6
12
|
|
7
13
|
### Bug fixes
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -77,6 +77,22 @@ Minitest/AssertNil:
|
|
77
77
|
|
78
78
|
You can read a lot more about RuboCop Minitest in its [official docs](https://docs.rubocop.org/rubocop-minitest/).
|
79
79
|
|
80
|
+
## Readme Badge
|
81
|
+
|
82
|
+
If you use RuboCop Minitest in your project, you can include one of these badges in your readme to let people know that your code is written following the community Minitest Style Guide.
|
83
|
+
|
84
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop-minitest)
|
85
|
+
|
86
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
87
|
+
|
88
|
+
Here are the Markdown snippets for the two badges:
|
89
|
+
|
90
|
+
``` markdown
|
91
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop-minitest)
|
92
|
+
|
93
|
+
[![Minitest Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://minitest.rubystyle.guide)
|
94
|
+
```
|
95
|
+
|
80
96
|
## Contributing
|
81
97
|
|
82
98
|
Checkout the [contribution guidelines](CONTRIBUTING.md).
|
@@ -1,6 +1,17 @@
|
|
1
|
+
= Cops
|
2
|
+
|
3
|
+
In RuboCop lingo the various checks performed on the code are called cops.
|
4
|
+
Each cop is responsible for detecting one particular offense.
|
5
|
+
RuboCop Minitest has only one Minitest department.
|
6
|
+
|
7
|
+
== Minitest
|
8
|
+
|
9
|
+
Minitest cops check for Minitest best practices and coding conventions. Many of the them are
|
10
|
+
based on the https://minitest.rubystyle.guide/[Minitest Style Guide].
|
11
|
+
|
1
12
|
// START_COP_LIST
|
2
13
|
|
3
|
-
|
14
|
+
=== Department xref:cops_minitest.adoc[Minitest]
|
4
15
|
|
5
16
|
* xref:cops_minitest.adoc#minitestassertempty[Minitest/AssertEmpty]
|
6
17
|
* xref:cops_minitest.adoc#minitestassertemptyliteral[Minitest/AssertEmptyLiteral]
|
@@ -638,7 +638,7 @@ refute_empty(object, 'message')
|
|
638
638
|
|===
|
639
639
|
|
640
640
|
This cop enforces the use of `refute_equal(expected, object)`
|
641
|
-
over `
|
641
|
+
over `assert(expected != actual)` or `assert(! expected == actual)`.
|
642
642
|
|
643
643
|
=== Examples
|
644
644
|
|
@@ -4,7 +4,7 @@ module RuboCop
|
|
4
4
|
module Cop
|
5
5
|
module Minitest
|
6
6
|
# This cop enforces the use of `refute_equal(expected, object)`
|
7
|
-
# over `
|
7
|
+
# over `assert(expected != actual)` or `assert(! expected == actual)`.
|
8
8
|
#
|
9
9
|
# @example
|
10
10
|
# # bad
|
@@ -57,7 +57,7 @@ module RuboCop
|
|
57
57
|
private
|
58
58
|
|
59
59
|
def peel_redundant_parentheses_from(arguments)
|
60
|
-
return arguments unless arguments.first
|
60
|
+
return arguments unless arguments.first&.begin_type?
|
61
61
|
|
62
62
|
peel_redundant_parentheses_from(arguments.first.children)
|
63
63
|
end
|
data/relnotes/v0.10.2.md
ADDED
data/rubocop-minitest.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'rubocop/minitest/version'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'rubocop-minitest'
|
9
|
-
spec.version = RuboCop::Minitest::
|
9
|
+
spec.version = RuboCop::Minitest::Version::STRING
|
10
10
|
spec.authors = ['Bozhidar Batsov', 'Jonas Arvidsson', 'Koichi ITO']
|
11
11
|
|
12
12
|
spec.summary = 'Automatic Minitest code style checking tool.'
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
'homepage_uri' => 'https://docs.rubocop.org/rubocop-minitest/',
|
22
22
|
'changelog_uri' => 'https://github.com/rubocop-hq/rubocop-minitest/blob/master/CHANGELOG.md',
|
23
23
|
'source_code_uri' => 'https://github.com/rubocop-hq/rubocop-minitest',
|
24
|
-
'documentation_uri' =>
|
24
|
+
'documentation_uri' => "https://docs.rubocop.org/rubocop-minitest/#{RuboCop::Minitest::Version.document_version}",
|
25
25
|
'bug_tracker_uri' => 'https://github.com/rubocop-hq/rubocop-minitest/issues'
|
26
26
|
}
|
27
27
|
|
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
35
|
spec.require_paths = ['lib']
|
36
36
|
|
37
|
-
spec.add_runtime_dependency 'rubocop', '>= 0.87'
|
37
|
+
spec.add_runtime_dependency 'rubocop', '>= 0.87', '< 2.0'
|
38
38
|
spec.add_development_dependency 'minitest', '~> 5.11'
|
39
39
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'yard'
|
4
4
|
require 'rubocop'
|
5
5
|
require 'rubocop-minitest'
|
6
|
+
require 'rubocop/cops_documentation_generator'
|
6
7
|
|
7
8
|
YARD::Rake::YardocTask.new(:yard_for_generate_documentation) do |task|
|
8
9
|
task.files = ['lib/rubocop/cop/**/*.rb']
|
@@ -11,302 +12,23 @@ end
|
|
11
12
|
|
12
13
|
desc 'Generate docs of all cops departments'
|
13
14
|
task generate_cops_documentation: :yard_for_generate_documentation do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
def cops_body(config, cop, description, examples_objects, pars)
|
19
|
-
content = h2(cop.cop_name)
|
20
|
-
content << required_ruby_version(cop)
|
21
|
-
content << properties(cop.new(config))
|
22
|
-
content << "#{description}\n"
|
23
|
-
content << examples(examples_objects) if examples_objects.count.positive?
|
24
|
-
content << configurations(pars)
|
25
|
-
content << references(config, cop)
|
26
|
-
content
|
27
|
-
end
|
28
|
-
|
29
|
-
def examples(examples_object)
|
30
|
-
examples_object.each_with_object(h3('Examples').dup) do |example, content|
|
31
|
-
content << "\n" unless content.end_with?("\n\n")
|
32
|
-
content << h4(example.name) unless example.name == ''
|
33
|
-
content << code_example(example)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def required_ruby_version(cop)
|
38
|
-
return '' unless cop.respond_to?(:required_minimum_ruby_version)
|
39
|
-
|
40
|
-
"NOTE: Required Ruby version: #{cop.required_minimum_ruby_version}\n\n"
|
41
|
-
end
|
42
|
-
|
43
|
-
# rubocop:disable Metrics/MethodLength
|
44
|
-
def properties(cop_instance)
|
45
|
-
header = [
|
46
|
-
'Enabled by default', 'Safe', 'Supports autocorrection', 'VersionAdded',
|
47
|
-
'VersionChanged'
|
48
|
-
]
|
49
|
-
autocorrect = if cop_instance.support_autocorrect?
|
50
|
-
"Yes#{' (Unsafe)' unless cop_instance.safe_autocorrect?}"
|
51
|
-
else
|
52
|
-
'No'
|
53
|
-
end
|
54
|
-
cop_config = cop_instance.cop_config
|
55
|
-
content = [[
|
56
|
-
cop_status(cop_config.fetch('Enabled')),
|
57
|
-
cop_config.fetch('Safe', true) ? 'Yes' : 'No',
|
58
|
-
autocorrect,
|
59
|
-
cop_config.fetch('VersionAdded', '-'),
|
60
|
-
cop_config.fetch('VersionChanged', '-')
|
61
|
-
]]
|
62
|
-
"#{to_table(header, content)}\n"
|
63
|
-
end
|
64
|
-
# rubocop:enable Metrics/MethodLength
|
65
|
-
|
66
|
-
def h2(title)
|
67
|
-
content = +"\n"
|
68
|
-
content << "== #{title}\n"
|
69
|
-
content << "\n"
|
70
|
-
content
|
71
|
-
end
|
72
|
-
|
73
|
-
def h3(title)
|
74
|
-
content = +"\n"
|
75
|
-
content << "=== #{title}\n"
|
76
|
-
content << "\n"
|
77
|
-
content
|
78
|
-
end
|
79
|
-
|
80
|
-
def h4(title)
|
81
|
-
content = +"==== #{title}\n"
|
82
|
-
content << "\n"
|
83
|
-
content
|
84
|
-
end
|
85
|
-
|
86
|
-
def code_example(ruby_code)
|
87
|
-
content = +"[source,ruby]\n----\n"
|
88
|
-
content << ruby_code.text.gsub('@good', '# good')
|
89
|
-
.gsub('@bad', '# bad').strip
|
90
|
-
content << "\n----\n"
|
91
|
-
content
|
92
|
-
end
|
93
|
-
|
94
|
-
def configurations(pars)
|
95
|
-
return '' if pars.empty?
|
96
|
-
|
97
|
-
header = ['Name', 'Default value', 'Configurable values']
|
98
|
-
configs = pars
|
99
|
-
.each_key
|
100
|
-
.reject { |key| key.start_with?('Supported') }
|
101
|
-
.reject { |key| key.start_with?('AllowMultipleStyles') }
|
102
|
-
content = configs.map do |name|
|
103
|
-
configurable = configurable_values(pars, name)
|
104
|
-
default = format_table_value(pars[name])
|
105
|
-
[name, default, configurable]
|
106
|
-
end
|
107
|
-
|
108
|
-
h3('Configurable attributes') + to_table(header, content)
|
109
|
-
end
|
110
|
-
|
111
|
-
# rubocop:disable Metrics/CyclomaticComplexity,Metrics/MethodLength
|
112
|
-
def configurable_values(pars, name)
|
113
|
-
case name
|
114
|
-
when /^Enforced/
|
115
|
-
supported_style_name = RuboCop::Cop::Util.to_supported_styles(name)
|
116
|
-
format_table_value(pars[supported_style_name])
|
117
|
-
when 'IndentationWidth'
|
118
|
-
'Integer'
|
119
|
-
else
|
120
|
-
case pars[name]
|
121
|
-
when String
|
122
|
-
'String'
|
123
|
-
when Integer
|
124
|
-
'Integer'
|
125
|
-
when Float
|
126
|
-
'Float'
|
127
|
-
when true, false
|
128
|
-
'Boolean'
|
129
|
-
when Array
|
130
|
-
'Array'
|
131
|
-
else
|
132
|
-
''
|
133
|
-
end
|
134
|
-
end
|
135
|
-
end
|
136
|
-
# rubocop:enable Metrics/CyclomaticComplexity,Metrics/MethodLength
|
137
|
-
|
138
|
-
def to_table(header, content)
|
139
|
-
table = [
|
140
|
-
'|===',
|
141
|
-
"| #{header.join(' | ')}\n\n"
|
142
|
-
].join("\n")
|
143
|
-
marked_contents = content.map do |plain_content|
|
144
|
-
plain_content.map { |c| "| #{c}" }.join("\n")
|
145
|
-
end
|
146
|
-
table << marked_contents.join("\n\n")
|
147
|
-
table << "\n|===\n"
|
148
|
-
end
|
149
|
-
|
150
|
-
def format_table_value(val)
|
151
|
-
value =
|
152
|
-
case val
|
153
|
-
when Array
|
154
|
-
if val.empty?
|
155
|
-
'`[]`'
|
156
|
-
else
|
157
|
-
val.map { |config| format_table_value(config) }.join(', ')
|
158
|
-
end
|
159
|
-
else
|
160
|
-
wrap_backtick(val.nil? ? '<none>' : val)
|
161
|
-
end
|
162
|
-
value.gsub("#{Dir.pwd}/", '').rstrip
|
163
|
-
end
|
164
|
-
|
165
|
-
def wrap_backtick(value)
|
166
|
-
if value.is_a?(String)
|
167
|
-
# Use `+` to prevent text like `**/*.gemspec` from being bold.
|
168
|
-
value.start_with?('*') ? "`+#{value}+`" : "`#{value}`"
|
169
|
-
else
|
170
|
-
"`#{value}`"
|
171
|
-
end
|
172
|
-
end
|
173
|
-
|
174
|
-
def references(config, cop)
|
175
|
-
cop_config = config.for_cop(cop)
|
176
|
-
urls = RuboCop::Cop::MessageAnnotator.new(
|
177
|
-
config, cop.name, cop_config, {}
|
178
|
-
).urls
|
179
|
-
return '' if urls.empty?
|
180
|
-
|
181
|
-
content = h3('References')
|
182
|
-
content << urls.map { |url| "* #{url}" }.join("\n")
|
183
|
-
content << "\n"
|
184
|
-
content
|
185
|
-
end
|
186
|
-
|
187
|
-
def print_cops_of_department(cops, department, config)
|
188
|
-
selected_cops = cops_of_department(cops, department).select do |cop|
|
189
|
-
cop.to_s.start_with?('RuboCop::Cop::Minitest')
|
190
|
-
end
|
191
|
-
return if selected_cops.empty?
|
192
|
-
|
193
|
-
selected_cops = cops_of_department(cops, department)
|
194
|
-
content = +"= #{department}\n"
|
195
|
-
selected_cops.each do |cop|
|
196
|
-
content << print_cop_with_doc(cop, config)
|
197
|
-
end
|
198
|
-
file_name = "#{Dir.pwd}/docs/modules/ROOT/pages/cops_#{department.downcase}.adoc"
|
199
|
-
File.open(file_name, 'w') do |file|
|
200
|
-
puts "* generated #{file_name}"
|
201
|
-
file.write("#{content.strip}\n")
|
202
|
-
end
|
203
|
-
end
|
204
|
-
|
205
|
-
def print_cop_with_doc(cop, config)
|
206
|
-
t = config.for_cop(cop)
|
207
|
-
non_display_keys = %w[
|
208
|
-
Description Enabled StyleGuide Reference Safe SafeAutoCorrect VersionAdded
|
209
|
-
VersionChanged
|
210
|
-
]
|
211
|
-
pars = t.reject { |k| non_display_keys.include? k }
|
212
|
-
description = 'No documentation'
|
213
|
-
examples_object = []
|
214
|
-
cop_code(cop) do |code_object|
|
215
|
-
description = code_object.docstring unless code_object.docstring.blank?
|
216
|
-
examples_object = code_object.tags('example')
|
217
|
-
end
|
218
|
-
cops_body(config, cop, description, examples_object, pars)
|
219
|
-
end
|
220
|
-
|
221
|
-
def cop_code(cop)
|
222
|
-
YARD::Registry.all(:class).detect do |code_object|
|
223
|
-
next unless RuboCop::Cop::Badge.for(code_object.to_s) == cop.badge
|
224
|
-
|
225
|
-
yield code_object
|
226
|
-
end
|
227
|
-
end
|
228
|
-
|
229
|
-
# rubocop:disable Metrics/AbcSize
|
230
|
-
def table_of_content_for_department(cops, department)
|
231
|
-
selected_cops = cops_of_department(cops, department.to_sym).select do |cop|
|
232
|
-
cop.to_s.start_with?('RuboCop::Cop::Minitest')
|
233
|
-
end
|
234
|
-
return if selected_cops.empty?
|
235
|
-
|
236
|
-
type_title = department[0].upcase + department[1..-1]
|
237
|
-
filename = "cops_#{department.downcase}.adoc"
|
238
|
-
content = +"= Department xref:#{filename}[#{type_title}]\n\n"
|
239
|
-
cops_of_department(cops, department.to_sym).each do |cop|
|
240
|
-
anchor = cop.cop_name.sub('/', '').downcase
|
241
|
-
content << "* xref:#{filename}##{anchor}[#{cop.cop_name}]\n"
|
242
|
-
end
|
243
|
-
|
244
|
-
content
|
245
|
-
end
|
246
|
-
# rubocop:enable Metrics/AbcSize
|
247
|
-
|
248
|
-
def print_table_of_contents(cops)
|
249
|
-
path = "#{Dir.pwd}/docs/modules/ROOT/pages/cops.adoc"
|
250
|
-
original = File.read(path)
|
251
|
-
content = +"// START_COP_LIST\n\n"
|
252
|
-
|
253
|
-
content << table_contents(cops)
|
254
|
-
|
255
|
-
content << "\n// END_COP_LIST"
|
256
|
-
|
257
|
-
content = original.sub(
|
258
|
-
%r{// START_COP_LIST.+// END_COP_LIST}m, content
|
259
|
-
)
|
260
|
-
File.write(path, content)
|
261
|
-
end
|
262
|
-
|
263
|
-
def table_contents(cops)
|
264
|
-
cops
|
265
|
-
.departments
|
266
|
-
.map(&:to_s)
|
267
|
-
.sort
|
268
|
-
.map { |department| table_of_content_for_department(cops, department) }
|
269
|
-
.compact
|
270
|
-
.join("\n")
|
271
|
-
end
|
272
|
-
|
273
|
-
def cop_status(status)
|
274
|
-
return 'Disabled' unless status
|
275
|
-
|
276
|
-
status == 'pending' ? 'Pending' : 'Enabled'
|
277
|
-
end
|
278
|
-
|
279
|
-
def assert_docs_synchronized
|
280
|
-
# Do not print diff and yield whether exit code was zero
|
281
|
-
sh('git diff --quiet docs') do |outcome, _|
|
282
|
-
return if outcome
|
283
|
-
|
284
|
-
# Output diff before raising error
|
285
|
-
sh('GIT_PAGER=cat git diff docs')
|
286
|
-
|
287
|
-
warn 'The docs directory is out of sync. ' \
|
288
|
-
'Run `rake generate_cops_documentation` and commit the results.'
|
289
|
-
exit!
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
|
-
def main
|
294
|
-
cops = RuboCop::Cop::Cop.registry
|
295
|
-
config = RuboCop::ConfigLoader.load_file('config/default.yml')
|
15
|
+
deps = ['Minitest']
|
16
|
+
CopsDocumentationGenerator.new(departments: deps).call
|
17
|
+
end
|
296
18
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
19
|
+
desc 'Verify that documentation is up to date'
|
20
|
+
task verify_cops_documentation: :generate_cops_documentation do
|
21
|
+
# Do not print diff and yield whether exit code was zero
|
22
|
+
sh('git diff --quiet docs') do |outcome, _|
|
23
|
+
exit if outcome
|
301
24
|
|
302
|
-
|
25
|
+
# Output diff before raising error
|
26
|
+
sh('GIT_PAGER=cat git diff docs')
|
303
27
|
|
304
|
-
|
305
|
-
|
306
|
-
|
28
|
+
warn 'The docs directory is out of sync. ' \
|
29
|
+
'Run `rake generate_cops_documentation` and commit the results.'
|
30
|
+
exit!
|
307
31
|
end
|
308
|
-
|
309
|
-
main
|
310
32
|
end
|
311
33
|
|
312
34
|
desc 'Syntax check for the documentation comments'
|
@@ -315,7 +37,7 @@ task documentation_syntax_check: :yard_for_generate_documentation do
|
|
315
37
|
|
316
38
|
ok = true
|
317
39
|
YARD::Registry.load!
|
318
|
-
cops = RuboCop::Cop::
|
40
|
+
cops = RuboCop::Cop::Registry.global
|
319
41
|
cops.each do |cop|
|
320
42
|
examples = YARD::Registry.all(:class).find do |code_object|
|
321
43
|
next unless RuboCop::Cop::Badge.for(code_object.to_s) == cop.badge
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
- Jonas Arvidsson
|
9
9
|
- Koichi ITO
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-
|
13
|
+
date: 2020-12-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -19,6 +19,9 @@ dependencies:
|
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '0.87'
|
22
|
+
- - "<"
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: '2.0'
|
22
25
|
type: :runtime
|
23
26
|
prerelease: false
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,6 +29,9 @@ dependencies:
|
|
26
29
|
- - ">="
|
27
30
|
- !ruby/object:Gem::Version
|
28
31
|
version: '0.87'
|
32
|
+
- - "<"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.0'
|
29
35
|
- !ruby/object:Gem::Dependency
|
30
36
|
name: minitest
|
31
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,7 +49,7 @@ dependencies:
|
|
43
49
|
description: |
|
44
50
|
Automatic Minitest code style checking tool.
|
45
51
|
A RuboCop extension focused on enforcing Minitest best practices and coding conventions.
|
46
|
-
email:
|
52
|
+
email:
|
47
53
|
executables: []
|
48
54
|
extensions: []
|
49
55
|
extra_rdoc_files: []
|
@@ -124,6 +130,7 @@ files:
|
|
124
130
|
- relnotes/v0.1.0.md
|
125
131
|
- relnotes/v0.10.0.md
|
126
132
|
- relnotes/v0.10.1.md
|
133
|
+
- relnotes/v0.10.2.md
|
127
134
|
- relnotes/v0.2.0.md
|
128
135
|
- relnotes/v0.2.1.md
|
129
136
|
- relnotes/v0.3.0.md
|
@@ -141,16 +148,16 @@ files:
|
|
141
148
|
- rubocop-minitest.gemspec
|
142
149
|
- tasks/cops_documentation.rake
|
143
150
|
- tasks/cut_release.rake
|
144
|
-
homepage:
|
151
|
+
homepage:
|
145
152
|
licenses:
|
146
153
|
- MIT
|
147
154
|
metadata:
|
148
155
|
homepage_uri: https://docs.rubocop.org/rubocop-minitest/
|
149
156
|
changelog_uri: https://github.com/rubocop-hq/rubocop-minitest/blob/master/CHANGELOG.md
|
150
157
|
source_code_uri: https://github.com/rubocop-hq/rubocop-minitest
|
151
|
-
documentation_uri: https://docs.rubocop.org/rubocop-minitest/
|
158
|
+
documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.10
|
152
159
|
bug_tracker_uri: https://github.com/rubocop-hq/rubocop-minitest/issues
|
153
|
-
post_install_message:
|
160
|
+
post_install_message:
|
154
161
|
rdoc_options: []
|
155
162
|
require_paths:
|
156
163
|
- lib
|
@@ -165,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
172
|
- !ruby/object:Gem::Version
|
166
173
|
version: '0'
|
167
174
|
requirements: []
|
168
|
-
rubygems_version: 3.
|
169
|
-
signing_key:
|
175
|
+
rubygems_version: 3.2.3
|
176
|
+
signing_key:
|
170
177
|
specification_version: 4
|
171
178
|
summary: Automatic Minitest code style checking tool.
|
172
179
|
test_files: []
|