rubocop-minitest 0.20.1 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/config/default.yml +11 -0
  3. data/lib/rubocop/cop/generator.rb +1 -7
  4. data/lib/rubocop/cop/minitest/assert_in_delta.rb +1 -1
  5. data/lib/rubocop/cop/minitest/assert_match.rb +1 -1
  6. data/lib/rubocop/cop/minitest/assert_predicate.rb +1 -1
  7. data/lib/rubocop/cop/minitest/assert_raises_compound_body.rb +45 -0
  8. data/lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb +36 -0
  9. data/lib/rubocop/cop/minitest/assert_silent.rb +1 -1
  10. data/lib/rubocop/cop/minitest/refute_equal.rb +1 -2
  11. data/lib/rubocop/cop/minitest/refute_in_delta.rb +1 -1
  12. data/lib/rubocop/cop/minitest/refute_predicate.rb +1 -1
  13. data/lib/rubocop/cop/minitest/unreachable_assertion.rb +1 -1
  14. data/lib/rubocop/cop/minitest_cops.rb +2 -0
  15. data/lib/rubocop/cop/mixin/argument_range_helper.rb +4 -12
  16. data/lib/rubocop/cop/mixin/in_delta_mixin.rb +1 -0
  17. data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +11 -4
  18. data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +1 -0
  19. data/lib/rubocop/cop/mixin/nil_assertion_handleable.rb +1 -0
  20. data/lib/rubocop/cop/mixin/predicate_assertion_handleable.rb +2 -5
  21. data/lib/rubocop/minitest/assert_offense.rb +1 -1
  22. data/lib/rubocop/minitest/version.rb +1 -1
  23. metadata +5 -79
  24. data/.circleci/config.yml +0 -55
  25. data/.gitattributes +0 -1
  26. data/.github/FUNDING.yml +0 -7
  27. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
  28. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  29. data/.github/PULL_REQUEST_TEMPLATE.md +0 -17
  30. data/.github/workflows/linting.yml +0 -15
  31. data/.github/workflows/spell_checking.yml +0 -33
  32. data/.gitignore +0 -61
  33. data/.rubocop.yml +0 -101
  34. data/.rubocop_todo.yml +0 -19
  35. data/.yamllint.yml +0 -9
  36. data/.yardopts +0 -3
  37. data/CHANGELOG.md +0 -323
  38. data/CONTRIBUTING.md +0 -69
  39. data/Gemfile +0 -16
  40. data/Rakefile +0 -60
  41. data/bin/console +0 -11
  42. data/bin/setup +0 -8
  43. data/codespell.txt +0 -0
  44. data/docs/antora.yml +0 -7
  45. data/docs/modules/ROOT/nav.adoc +0 -6
  46. data/docs/modules/ROOT/pages/cops.adoc +0 -55
  47. data/docs/modules/ROOT/pages/cops_minitest.adoc +0 -1412
  48. data/docs/modules/ROOT/pages/index.adoc +0 -5
  49. data/docs/modules/ROOT/pages/installation.adoc +0 -15
  50. data/docs/modules/ROOT/pages/usage.adoc +0 -32
  51. data/legacy-docs/cops.md +0 -23
  52. data/legacy-docs/cops_minitest.md +0 -448
  53. data/legacy-docs/index.md +0 -1
  54. data/legacy-docs/installation.md +0 -11
  55. data/legacy-docs/usage.md +0 -27
  56. data/mkdocs.yml +0 -13
  57. data/readthedocs.yml +0 -5
  58. data/relnotes/v0.1.0.md +0 -7
  59. data/relnotes/v0.10.0.md +0 -21
  60. data/relnotes/v0.10.1.md +0 -5
  61. data/relnotes/v0.10.2.md +0 -5
  62. data/relnotes/v0.10.3.md +0 -5
  63. data/relnotes/v0.11.0.md +0 -16
  64. data/relnotes/v0.11.1.md +0 -5
  65. data/relnotes/v0.12.0.md +0 -10
  66. data/relnotes/v0.12.1.md +0 -5
  67. data/relnotes/v0.13.0.md +0 -5
  68. data/relnotes/v0.14.0.md +0 -5
  69. data/relnotes/v0.15.0.md +0 -5
  70. data/relnotes/v0.15.1.md +0 -5
  71. data/relnotes/v0.15.2.md +0 -5
  72. data/relnotes/v0.16.0.md +0 -11
  73. data/relnotes/v0.17.0.md +0 -5
  74. data/relnotes/v0.17.1.md +0 -5
  75. data/relnotes/v0.17.2.md +0 -5
  76. data/relnotes/v0.18.0.md +0 -9
  77. data/relnotes/v0.19.0.md +0 -5
  78. data/relnotes/v0.19.1.md +0 -5
  79. data/relnotes/v0.2.0.md +0 -9
  80. data/relnotes/v0.2.1.md +0 -5
  81. data/relnotes/v0.20.0.md +0 -13
  82. data/relnotes/v0.20.1.md +0 -5
  83. data/relnotes/v0.3.0.md +0 -16
  84. data/relnotes/v0.4.0.md +0 -14
  85. data/relnotes/v0.4.1.md +0 -5
  86. data/relnotes/v0.5.0.md +0 -5
  87. data/relnotes/v0.5.1.md +0 -5
  88. data/relnotes/v0.6.0.md +0 -5
  89. data/relnotes/v0.6.1.md +0 -6
  90. data/relnotes/v0.6.2.md +0 -5
  91. data/relnotes/v0.7.0.md +0 -13
  92. data/relnotes/v0.8.0.md +0 -12
  93. data/relnotes/v0.8.1.md +0 -5
  94. data/relnotes/v0.9.0.md +0 -10
  95. data/rubocop-minitest.gemspec +0 -40
  96. data/tasks/changelog.rake +0 -34
  97. data/tasks/changelog.rb +0 -166
  98. data/tasks/cops_documentation.rake +0 -50
  99. data/tasks/cut_release.rake +0 -91
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d780d9c08b215f247a19ffc039d8385b58f63037585c882e3b760cdbe511ae14
4
- data.tar.gz: 1ea02089d0b9a3511cbc19a3222f3c55e86a3c17d05bdc05291281df8115500a
3
+ metadata.gz: 914b7325a79669c3eab38a4dd9c822aeddf4906658289d3a1d797a9f53646ebe
4
+ data.tar.gz: 3eb6732b5ef6a7e12dfe4edf72fea04d6ba809bb3ccba81eec57cb036b636605
5
5
  SHA512:
6
- metadata.gz: 241d069163e52ba35fc4edb2c96d3f7fca6a32fa84ced1feee2abf777d42561503b309371444b81da318c3f07bce469a89e12fc2f6d0295372c3249c41db1ff1
7
- data.tar.gz: 76ec782b3a226848f6676266dfbd1f06dc0cf2bbd999f01f9c46096def25cfe188c7dddb95ca93ab737812ef6eae81fd8401872b8a243344e1903c50143a699c
6
+ metadata.gz: 70a99db12a8e7b52fcf9beac4abab5ffa7f3fa02a4313677cddeae8ba28028682151b4675d0d41de54788f793edb6118a800b3eec10d61511735f61c0c716e16
7
+ data.tar.gz: 9ce389c156f54cfa50f206c562c4a6360067c4fcc73a1798343e7f2accd776c0c9d0b13839db2d608503ab49d314bbc93882e46f0355c9c9e7751481a533b689
data/config/default.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  Minitest:
2
2
  Enabled: true
3
+ DocumentationBaseURL: https://docs.rubocop.org/rubocop-minitest
3
4
  Include:
4
5
  - '**/test/**/*'
5
6
  - '**/*_test.rb'
@@ -76,6 +77,16 @@ Minitest/AssertPredicate:
76
77
  Enabled: pending
77
78
  VersionAdded: '0.18'
78
79
 
80
+ Minitest/AssertRaisesCompoundBody:
81
+ Description: 'This cop enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.'
82
+ Enabled: pending
83
+ VersionAdded: '0.21'
84
+
85
+ Minitest/AssertRaisesWithRegexpArgument:
86
+ Description: 'This cop enforces checks for regular expression literals passed to `assert_raises`.'
87
+ Enabled: pending
88
+ VersionAdded: '0.22'
89
+
79
90
  Minitest/AssertRespondTo:
80
91
  Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
81
92
  StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
@@ -39,13 +39,7 @@ module RuboCop
39
39
  private
40
40
 
41
41
  def test_path
42
- File.join(
43
- 'test',
44
- 'rubocop',
45
- 'cop',
46
- 'minitest',
47
- "#{snake_case(badge.cop_name.to_s)}_test.rb"
48
- )
42
+ File.join('test', 'rubocop', 'cop', 'minitest', "#{snake_case(badge.cop_name.to_s)}_test.rb")
49
43
  end
50
44
 
51
45
  def generated_test
@@ -19,7 +19,7 @@ module RuboCop
19
19
  include InDeltaMixin
20
20
  extend AutoCorrector
21
21
 
22
- RESTRICT_ON_SEND = %i[assert_equal].freeze
22
+ RESTRICT_ON_SEND = %i[assert_equal].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
23
23
 
24
24
  def_node_matcher :equal_floats_call, <<~PATTERN
25
25
  (send nil? :assert_equal $_ $_ $...)
@@ -18,7 +18,7 @@ module RuboCop
18
18
  class AssertMatch < Base
19
19
  extend MinitestCopRule
20
20
 
21
- define_rule :assert, target_method: :match
21
+ define_rule :assert, target_method: :match, inverse: 'regexp_type?'
22
22
  end
23
23
  end
24
24
  end
@@ -21,7 +21,7 @@ module RuboCop
21
21
  extend AutoCorrector
22
22
 
23
23
  MSG = 'Prefer using `assert_predicate(%<new_arguments>s)`.'
24
- RESTRICT_ON_SEND = %i[assert].freeze
24
+ RESTRICT_ON_SEND = %i[assert].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
25
25
 
26
26
  private
27
27
 
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Minitest
6
+ # Enforces the block body of `assert_raises { ... }` to be reduced to only the raising code.
7
+ #
8
+ # @example
9
+ # # bad
10
+ # assert_raises(MyError) do
11
+ # foo
12
+ # bar
13
+ # end
14
+ #
15
+ # # good
16
+ # assert_raises(MyError) do
17
+ # foo
18
+ # end
19
+ #
20
+ # # good
21
+ # assert_raises(MyError) do
22
+ # foo do
23
+ # bar
24
+ # baz
25
+ # end
26
+ # end
27
+ #
28
+ class AssertRaisesCompoundBody < Base
29
+ MSG = 'Reduce `assert_raises` block body to contain only the raising code.'
30
+
31
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
32
+ return unless node.method?(:assert_raises) && multi_statement_begin?(node.body)
33
+
34
+ add_offense(node)
35
+ end
36
+
37
+ private
38
+
39
+ def multi_statement_begin?(node)
40
+ node.begin_type? && node.children.size > 1
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Minitest
6
+ # Checks for `assert_raises` with arguments of regular expression literals.
7
+ # Arguments should be exception classes.
8
+ # Optionally the last argument can be a custom message string to help explain failures.
9
+ # Either way, it's not the argument that `exception.message` is compared to.
10
+ # The raised exception is returned and can be used
11
+ # to match against a regular expression.
12
+ #
13
+ # @example
14
+ #
15
+ # # bad
16
+ # assert_raises FooError, /some message/ do
17
+ # obj.occur_error
18
+ # end
19
+ #
20
+ # # good
21
+ # exception = assert_raises FooError do
22
+ # obj.occur_error
23
+ # end
24
+ # assert_match(/some message/, exception.message)
25
+ #
26
+ class AssertRaisesWithRegexpArgument < Base
27
+ MSG = 'Do not pass regular expression literals to `assert_raises`. Test the resulting exception.'
28
+ RESTRICT_ON_SEND = %i[assert_raises].freeze
29
+
30
+ def on_send(node)
31
+ add_offense(node) if node.last_argument&.regexp_type?
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -26,7 +26,7 @@ module RuboCop
26
26
  ...)
27
27
  PATTERN
28
28
 
29
- def on_block(node)
29
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
30
30
  return unless assert_silent_candidate?(node)
31
31
 
32
32
  send_node = node.send_node
@@ -44,8 +44,7 @@ module RuboCop
44
44
  private
45
45
 
46
46
  def preferred_usage(first_arg, second_arg, custom_message = nil)
47
- [first_arg, second_arg, custom_message]
48
- .compact.map(&:source).join(', ')
47
+ [first_arg, second_arg, custom_message].compact.map(&:source).join(', ')
49
48
  end
50
49
 
51
50
  def original_usage(first_part, custom_message)
@@ -19,7 +19,7 @@ module RuboCop
19
19
  include InDeltaMixin
20
20
  extend AutoCorrector
21
21
 
22
- RESTRICT_ON_SEND = %i[refute_equal].freeze
22
+ RESTRICT_ON_SEND = %i[refute_equal].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
23
23
 
24
24
  def_node_matcher :equal_floats_call, <<~PATTERN
25
25
  (send nil? :refute_equal $_ $_ $...)
@@ -21,7 +21,7 @@ module RuboCop
21
21
  extend AutoCorrector
22
22
 
23
23
  MSG = 'Prefer using `refute_predicate(%<new_arguments>s)`.'
24
- RESTRICT_ON_SEND = %i[refute].freeze
24
+ RESTRICT_ON_SEND = %i[refute].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend
25
25
 
26
26
  private
27
27
 
@@ -25,7 +25,7 @@ module RuboCop
25
25
 
26
26
  MSG = 'Unreachable `%<assertion_method>s` detected.'
27
27
 
28
- def on_block(node)
28
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
29
29
  return unless node.method?(:assert_raises) && (body = node.body)
30
30
 
31
31
  last_node = body.begin_type? ? body.children.last : body
@@ -11,6 +11,8 @@ require_relative 'minitest/assert_empty_literal'
11
11
  require_relative 'minitest/assert_equal'
12
12
  require_relative 'minitest/assert_in_delta'
13
13
  require_relative 'minitest/assert_predicate'
14
+ require_relative 'minitest/assert_raises_compound_body'
15
+ require_relative 'minitest/assert_raises_with_regexp_argument'
14
16
  require_relative 'minitest/assert_with_expected_argument'
15
17
  require_relative 'minitest/assertion_in_lifecycle_hook'
16
18
  require_relative 'minitest/assert_kind_of'
@@ -3,6 +3,7 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  # Methods that calculate and return `Parser::Source::Ranges`.
6
+ # @api private
6
7
  module ArgumentRangeHelper
7
8
  include RangeHelp
8
9
 
@@ -11,30 +12,21 @@ module RuboCop
11
12
  def first_argument_range(node)
12
13
  first_argument = node.first_argument
13
14
 
14
- range_between(
15
- first_argument.source_range.begin_pos,
16
- first_argument.source_range.end_pos
17
- )
15
+ range_between(first_argument.source_range.begin_pos, first_argument.source_range.end_pos)
18
16
  end
19
17
 
20
18
  def first_and_second_arguments_range(node)
21
19
  first_argument = node.first_argument
22
20
  second_argument = node.arguments[1]
23
21
 
24
- range_between(
25
- first_argument.source_range.begin_pos,
26
- second_argument.source_range.end_pos
27
- )
22
+ range_between(first_argument.source_range.begin_pos, second_argument.source_range.end_pos)
28
23
  end
29
24
 
30
25
  def all_arguments_range(node)
31
26
  first_argument = node.first_argument
32
27
  last_argument = node.arguments.last
33
28
 
34
- range_between(
35
- first_argument.source_range.begin_pos,
36
- last_argument.source_range.end_pos
37
- )
29
+ range_between(first_argument.source_range.begin_pos, last_argument.source_range.end_pos)
38
30
  end
39
31
  end
40
32
  end
@@ -3,6 +3,7 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  # Common functionality for `AssertInDelta` and `RefuteInDelta` cops.
6
+ # @api private
6
7
  module InDeltaMixin
7
8
  MSG = 'Prefer using `%<good_method>s`.'
8
9
 
@@ -19,7 +19,9 @@ module RuboCop
19
19
  # autocorrection. The preferred method name that connects
20
20
  # `assertion_method` and `target_method` with `_` is
21
21
  # the default name.
22
- # @param inverse [Boolean] An optional param. Order of arguments replaced by autocorrection.
22
+ # @param inverse [Boolean, String] An optional param. Order of arguments replaced by autocorrection.
23
+ # If string is passed, it becomes a predicate method for the first argument node.
24
+ # @api private
23
25
  #
24
26
  def define_rule(assertion_method, target_method:, preferred_method: nil, inverse: false)
25
27
  preferred_method = "#{assertion_method}_#{target_method.to_s.delete('?')}" if preferred_method.nil?
@@ -77,10 +79,15 @@ module RuboCop
77
79
 
78
80
  def new_arguments(arguments)
79
81
  receiver = correct_receiver(arguments.first.receiver)
80
- method_argument = arguments.first.arguments.first&.source
82
+ method_argument = arguments.first.arguments.first
81
83
 
82
- new_arguments = [receiver, method_argument].compact
83
- new_arguments.reverse! if #{inverse}
84
+ new_arguments = [receiver, method_argument&.source].compact
85
+ inverse_condition = if %w[true false].include?('#{inverse}')
86
+ #{inverse}
87
+ else
88
+ method_argument.#{inverse}
89
+ end
90
+ new_arguments.reverse! if inverse_condition
84
91
  new_arguments
85
92
  end
86
93
 
@@ -5,6 +5,7 @@ require 'set'
5
5
  module RuboCop
6
6
  module Cop
7
7
  # Helper methods for different explorations against test files and test cases.
8
+ # @api private
8
9
  module MinitestExplorationHelpers
9
10
  extend NodePattern::Macros
10
11
 
@@ -4,6 +4,7 @@ module RuboCop
4
4
  module Cop
5
5
  module Minitest
6
6
  # Common functionality for `AssertNil` and `RefuteNil` cops.
7
+ # @api private
7
8
  module NilAssertionHandleable
8
9
  MSG = 'Prefer using `%<assertion_type>s_nil(%<preferred_args>s)`.'
9
10
 
@@ -4,9 +4,9 @@ module RuboCop
4
4
  module Cop
5
5
  module Minitest
6
6
  # Common functionality for `Minitest/AssertPredicate` and `Minitest/RefutePredicate` cops.
7
+ # @api private
7
8
  module PredicateAssertionHandleable
8
9
  MSG = 'Prefer using `%<assertion_type>s_predicate(%<new_arguments>s)`.'
9
- RESTRICT_ON_SEND = %i[assert].freeze
10
10
 
11
11
  def on_send(node)
12
12
  return unless (arguments = peel_redundant_parentheses_from(node.arguments))
@@ -46,10 +46,7 @@ module RuboCop
46
46
  def offense_message(arguments)
47
47
  message_argument = arguments.last if arguments.first != arguments.last
48
48
 
49
- new_arguments = [
50
- new_arguments(arguments),
51
- message_argument&.source
52
- ].flatten.compact.join(', ')
49
+ new_arguments = [new_arguments(arguments), message_argument&.source].flatten.compact.join(', ')
53
50
 
54
51
  format(MSG, assertion_type: assertion_type, new_arguments: new_arguments)
55
52
  end
@@ -27,7 +27,7 @@ module RuboCop
27
27
  # end
28
28
  # RUBY
29
29
  #
30
- # Auto-correction can be tested using `assert_correction` after
30
+ # Autocorrection can be tested using `assert_correction` after
31
31
  # `assert_offense`.
32
32
  #
33
33
  # @example `assert_offense` and `assert_correction`
@@ -4,7 +4,7 @@ module RuboCop
4
4
  module Minitest
5
5
  # This module holds the RuboCop Minitest version information.
6
6
  module Version
7
- STRING = '0.20.1'
7
+ STRING = '0.22.0'
8
8
 
9
9
  def self.document_version
10
10
  STRING.match('\d+\.\d+').to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-06-13 00:00:00.000000000 Z
13
+ date: 2022-09-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubocop
@@ -54,41 +54,9 @@ executables: []
54
54
  extensions: []
55
55
  extra_rdoc_files: []
56
56
  files:
57
- - ".circleci/config.yml"
58
- - ".gitattributes"
59
- - ".github/FUNDING.yml"
60
- - ".github/ISSUE_TEMPLATE/bug_report.md"
61
- - ".github/ISSUE_TEMPLATE/feature_request.md"
62
- - ".github/PULL_REQUEST_TEMPLATE.md"
63
- - ".github/workflows/linting.yml"
64
- - ".github/workflows/spell_checking.yml"
65
- - ".gitignore"
66
- - ".rubocop.yml"
67
- - ".rubocop_todo.yml"
68
- - ".yamllint.yml"
69
- - ".yardopts"
70
- - CHANGELOG.md
71
- - CONTRIBUTING.md
72
- - Gemfile
73
57
  - LICENSE.txt
74
58
  - README.md
75
- - Rakefile
76
- - bin/console
77
- - bin/setup
78
- - codespell.txt
79
59
  - config/default.yml
80
- - docs/antora.yml
81
- - docs/modules/ROOT/nav.adoc
82
- - docs/modules/ROOT/pages/cops.adoc
83
- - docs/modules/ROOT/pages/cops_minitest.adoc
84
- - docs/modules/ROOT/pages/index.adoc
85
- - docs/modules/ROOT/pages/installation.adoc
86
- - docs/modules/ROOT/pages/usage.adoc
87
- - legacy-docs/cops.md
88
- - legacy-docs/cops_minitest.md
89
- - legacy-docs/index.md
90
- - legacy-docs/installation.md
91
- - legacy-docs/usage.md
92
60
  - lib/rubocop-minitest.rb
93
61
  - lib/rubocop/cop/generator.rb
94
62
  - lib/rubocop/cop/minitest/assert_empty.rb
@@ -103,6 +71,8 @@ files:
103
71
  - lib/rubocop/cop/minitest/assert_output.rb
104
72
  - lib/rubocop/cop/minitest/assert_path_exists.rb
105
73
  - lib/rubocop/cop/minitest/assert_predicate.rb
74
+ - lib/rubocop/cop/minitest/assert_raises_compound_body.rb
75
+ - lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb
106
76
  - lib/rubocop/cop/minitest/assert_respond_to.rb
107
77
  - lib/rubocop/cop/minitest/assert_silent.rb
108
78
  - lib/rubocop/cop/minitest/assert_truthy.rb
@@ -141,50 +111,6 @@ files:
141
111
  - lib/rubocop/minitest/inject.rb
142
112
  - lib/rubocop/minitest/support.rb
143
113
  - lib/rubocop/minitest/version.rb
144
- - mkdocs.yml
145
- - readthedocs.yml
146
- - relnotes/v0.1.0.md
147
- - relnotes/v0.10.0.md
148
- - relnotes/v0.10.1.md
149
- - relnotes/v0.10.2.md
150
- - relnotes/v0.10.3.md
151
- - relnotes/v0.11.0.md
152
- - relnotes/v0.11.1.md
153
- - relnotes/v0.12.0.md
154
- - relnotes/v0.12.1.md
155
- - relnotes/v0.13.0.md
156
- - relnotes/v0.14.0.md
157
- - relnotes/v0.15.0.md
158
- - relnotes/v0.15.1.md
159
- - relnotes/v0.15.2.md
160
- - relnotes/v0.16.0.md
161
- - relnotes/v0.17.0.md
162
- - relnotes/v0.17.1.md
163
- - relnotes/v0.17.2.md
164
- - relnotes/v0.18.0.md
165
- - relnotes/v0.19.0.md
166
- - relnotes/v0.19.1.md
167
- - relnotes/v0.2.0.md
168
- - relnotes/v0.2.1.md
169
- - relnotes/v0.20.0.md
170
- - relnotes/v0.20.1.md
171
- - relnotes/v0.3.0.md
172
- - relnotes/v0.4.0.md
173
- - relnotes/v0.4.1.md
174
- - relnotes/v0.5.0.md
175
- - relnotes/v0.5.1.md
176
- - relnotes/v0.6.0.md
177
- - relnotes/v0.6.1.md
178
- - relnotes/v0.6.2.md
179
- - relnotes/v0.7.0.md
180
- - relnotes/v0.8.0.md
181
- - relnotes/v0.8.1.md
182
- - relnotes/v0.9.0.md
183
- - rubocop-minitest.gemspec
184
- - tasks/changelog.rake
185
- - tasks/changelog.rb
186
- - tasks/cops_documentation.rake
187
- - tasks/cut_release.rake
188
114
  homepage:
189
115
  licenses:
190
116
  - MIT
@@ -192,7 +118,7 @@ metadata:
192
118
  homepage_uri: https://docs.rubocop.org/rubocop-minitest/
193
119
  changelog_uri: https://github.com/rubocop/rubocop-minitest/blob/master/CHANGELOG.md
194
120
  source_code_uri: https://github.com/rubocop/rubocop-minitest
195
- documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.20
121
+ documentation_uri: https://docs.rubocop.org/rubocop-minitest/0.22
196
122
  bug_tracker_uri: https://github.com/rubocop/rubocop-minitest/issues
197
123
  rubygems_mfa_required: 'true'
198
124
  post_install_message:
data/.circleci/config.yml DELETED
@@ -1,55 +0,0 @@
1
- version: 2.1
2
-
3
- jobs:
4
- rake_default:
5
- parameters:
6
- image:
7
- description: "Name of the Docker image."
8
- type: string
9
- default: "circleci/ruby"
10
- docker:
11
- - image: << parameters.image >>
12
- environment:
13
- # CircleCI container has two cores, but Ruby can see 32 cores. So we
14
- # configure test-queue.
15
- # See https://github.com/tmm1/test-queue#environment-variables
16
- TEST_QUEUE_WORKERS: 2
17
- JRUBY_OPTS: "--dev -J-Xmx1000M"
18
- steps:
19
- - checkout
20
- - run: bundle install
21
- - run: bundle exec rake
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
-
34
- workflows:
35
- build:
36
- jobs:
37
- - documentation-checks
38
- - rake_default:
39
- name: Ruby 2.6
40
- image: cimg/ruby:2.6
41
- - rake_default:
42
- name: Ruby 2.7
43
- image: cimg/ruby:2.7
44
- - rake_default:
45
- name: Ruby 3.0
46
- image: cimg/ruby:3.0
47
- - rake_default:
48
- name: Ruby 3.1
49
- image: cimg/ruby:3.1
50
- - rake_default:
51
- name: Ruby HEAD
52
- image: rubocophq/circleci-ruby-snapshot:latest # Nightly snapshot build
53
- - rake_default:
54
- name: JRuby 9.3
55
- image: circleci/jruby:9.3
data/.gitattributes DELETED
@@ -1 +0,0 @@
1
- CHANGELOG.md merge=union
data/.github/FUNDING.yml DELETED
@@ -1,7 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: [bbatsov, koic]
4
- patreon: bbatsov
5
- open_collective: rubocop
6
- tidelift: "rubygems/rubocop"
7
- custom: https://www.paypal.me/bbatsov
@@ -1,43 +0,0 @@
1
- ---
2
- name: Bug Report
3
- about: Report an issue with RuboCop Minitest you've discovered.
4
- ---
5
-
6
- *Be clear, concise and precise in your description of the problem.
7
- Open an issue with a descriptive title and a summary in grammatically correct,
8
- complete sentences.*
9
-
10
- *Use the template below when reporting bugs. Please, make sure that
11
- you're running the latest stable RuboCop and that the problem you're reporting
12
- hasn't been reported (and potentially fixed) already.*
13
-
14
- *Before filing the ticket you should replace all text above the horizontal
15
- rule with your own words.*
16
-
17
- --------
18
-
19
- ## Expected behavior
20
-
21
- Describe here how you expected RuboCop Minitest to behave in this particular situation.
22
-
23
- ## Actual behavior
24
-
25
- Describe here what actually happened.
26
-
27
- ## Steps to reproduce the problem
28
-
29
- This is extremely important! Providing us with a reliable way to reproduce
30
- a problem will expedite its solution.
31
-
32
- ## RuboCop version
33
-
34
- Include the output of `rubocop -V` or `bundle exec rubocop -V` if using Bundler. Here's an example:
35
- You see extension cop versions (e.g. rubocop-minitest, rubocop-performance, and others) output by rubocop -V,
36
- include them as well. Here's an example:
37
-
38
- ```
39
- $ [bundle exec] rubocop -V
40
- 1.10.0 (using Parser 3.0.0.0, rubocop-ast 1.4.1, running on ruby 3.0.0 x86_64-darwin19)
41
- - rubocop-minitest 0.10.3
42
- - rubocop-performance 1.9.2
43
- ```
@@ -1,20 +0,0 @@
1
- ---
2
- name: Feature Request
3
- about: Suggest new RuboCop Minitest features or improvements to existing features.
4
- ---
5
-
6
- ## Is your feature request related to a problem? Please describe.
7
-
8
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
-
10
- ## Describe the solution you'd like
11
-
12
- A clear and concise description of what you want to happen.
13
-
14
- ## Describe alternatives you've considered
15
-
16
- A clear and concise description of any alternative solutions or features you've considered.
17
-
18
- ## Additional context
19
-
20
- Add any other context or screenshots about the feature request here.
@@ -1,17 +0,0 @@
1
- **Replace this text with a summary of the changes in your PR.
2
- The more detailed you are, the better.**
3
-
4
- -----------------
5
-
6
- Before submitting the PR make sure the following are checked:
7
-
8
- * [ ] The PR relates to *only* one subject with a clear title and description in grammatically correct, complete sentences.
9
- * [ ] Wrote [good commit messages][1].
10
- * [ ] Commit message starts with `[Fix #issue-number]` (if the related issue exists).
11
- * [ ] Feature branch is up-to-date with `master` (if not - rebase it).
12
- * [ ] Squashed related commits together.
13
- * [ ] Added tests.
14
- * [ ] Ran `bundle exec rake default`. It executes all tests and runs RuboCop on its own code.
15
- * [ ] Added an entry (file) to the [changelog folder](https://github.com/rubocop/rubocop-minitest/blob/master/changelog/) named `{change_type}_{change_description}.md` if the new code introduces user-observable changes. See [changelog entry format](https://github.com/rubocop/rubocop/blob/master/CONTRIBUTING.md#changelog-entry-format) for details.
16
-
17
- [1]: https://chris.beams.io/posts/git-commit/
@@ -1,15 +0,0 @@
1
- name: Linting
2
- on:
3
- - pull_request
4
- jobs:
5
- yamllint:
6
- name: Yamllint
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/checkout@v3
10
- - name: Yamllint
11
- uses: karancode/yamllint-github-action@master
12
- with:
13
- yamllint_comment: true
14
- env:
15
- GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}