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.
- checksums.yaml +4 -4
- data/config/default.yml +11 -0
- data/lib/rubocop/cop/generator.rb +1 -7
- data/lib/rubocop/cop/minitest/assert_in_delta.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_match.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_predicate.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_raises_compound_body.rb +45 -0
- data/lib/rubocop/cop/minitest/assert_raises_with_regexp_argument.rb +36 -0
- data/lib/rubocop/cop/minitest/assert_silent.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_equal.rb +1 -2
- data/lib/rubocop/cop/minitest/refute_in_delta.rb +1 -1
- data/lib/rubocop/cop/minitest/refute_predicate.rb +1 -1
- data/lib/rubocop/cop/minitest/unreachable_assertion.rb +1 -1
- data/lib/rubocop/cop/minitest_cops.rb +2 -0
- data/lib/rubocop/cop/mixin/argument_range_helper.rb +4 -12
- data/lib/rubocop/cop/mixin/in_delta_mixin.rb +1 -0
- data/lib/rubocop/cop/mixin/minitest_cop_rule.rb +11 -4
- data/lib/rubocop/cop/mixin/minitest_exploration_helpers.rb +1 -0
- data/lib/rubocop/cop/mixin/nil_assertion_handleable.rb +1 -0
- data/lib/rubocop/cop/mixin/predicate_assertion_handleable.rb +2 -5
- data/lib/rubocop/minitest/assert_offense.rb +1 -1
- data/lib/rubocop/minitest/version.rb +1 -1
- metadata +5 -79
- data/.circleci/config.yml +0 -55
- data/.gitattributes +0 -1
- data/.github/FUNDING.yml +0 -7
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -43
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -17
- data/.github/workflows/linting.yml +0 -15
- data/.github/workflows/spell_checking.yml +0 -33
- data/.gitignore +0 -61
- data/.rubocop.yml +0 -101
- data/.rubocop_todo.yml +0 -19
- data/.yamllint.yml +0 -9
- data/.yardopts +0 -3
- data/CHANGELOG.md +0 -323
- data/CONTRIBUTING.md +0 -69
- data/Gemfile +0 -16
- data/Rakefile +0 -60
- data/bin/console +0 -11
- data/bin/setup +0 -8
- data/codespell.txt +0 -0
- data/docs/antora.yml +0 -7
- data/docs/modules/ROOT/nav.adoc +0 -6
- data/docs/modules/ROOT/pages/cops.adoc +0 -55
- data/docs/modules/ROOT/pages/cops_minitest.adoc +0 -1412
- data/docs/modules/ROOT/pages/index.adoc +0 -5
- data/docs/modules/ROOT/pages/installation.adoc +0 -15
- data/docs/modules/ROOT/pages/usage.adoc +0 -32
- data/legacy-docs/cops.md +0 -23
- data/legacy-docs/cops_minitest.md +0 -448
- data/legacy-docs/index.md +0 -1
- data/legacy-docs/installation.md +0 -11
- data/legacy-docs/usage.md +0 -27
- data/mkdocs.yml +0 -13
- data/readthedocs.yml +0 -5
- data/relnotes/v0.1.0.md +0 -7
- data/relnotes/v0.10.0.md +0 -21
- data/relnotes/v0.10.1.md +0 -5
- data/relnotes/v0.10.2.md +0 -5
- data/relnotes/v0.10.3.md +0 -5
- data/relnotes/v0.11.0.md +0 -16
- data/relnotes/v0.11.1.md +0 -5
- data/relnotes/v0.12.0.md +0 -10
- data/relnotes/v0.12.1.md +0 -5
- data/relnotes/v0.13.0.md +0 -5
- data/relnotes/v0.14.0.md +0 -5
- data/relnotes/v0.15.0.md +0 -5
- data/relnotes/v0.15.1.md +0 -5
- data/relnotes/v0.15.2.md +0 -5
- data/relnotes/v0.16.0.md +0 -11
- data/relnotes/v0.17.0.md +0 -5
- data/relnotes/v0.17.1.md +0 -5
- data/relnotes/v0.17.2.md +0 -5
- data/relnotes/v0.18.0.md +0 -9
- data/relnotes/v0.19.0.md +0 -5
- data/relnotes/v0.19.1.md +0 -5
- data/relnotes/v0.2.0.md +0 -9
- data/relnotes/v0.2.1.md +0 -5
- data/relnotes/v0.20.0.md +0 -13
- data/relnotes/v0.20.1.md +0 -5
- data/relnotes/v0.3.0.md +0 -16
- data/relnotes/v0.4.0.md +0 -14
- data/relnotes/v0.4.1.md +0 -5
- data/relnotes/v0.5.0.md +0 -5
- data/relnotes/v0.5.1.md +0 -5
- data/relnotes/v0.6.0.md +0 -5
- data/relnotes/v0.6.1.md +0 -6
- data/relnotes/v0.6.2.md +0 -5
- data/relnotes/v0.7.0.md +0 -13
- data/relnotes/v0.8.0.md +0 -12
- data/relnotes/v0.8.1.md +0 -5
- data/relnotes/v0.9.0.md +0 -10
- data/rubocop-minitest.gemspec +0 -40
- data/tasks/changelog.rake +0 -34
- data/tasks/changelog.rb +0 -166
- data/tasks/cops_documentation.rake +0 -50
- data/tasks/cut_release.rake +0 -91
data/Rakefile
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
task release: 'changelog:check_clean' # Before task is required
|
4
|
-
|
5
|
-
require 'bundler'
|
6
|
-
require 'bundler/gem_tasks'
|
7
|
-
|
8
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
9
|
-
|
10
|
-
begin
|
11
|
-
Bundler.setup(:default, :development)
|
12
|
-
rescue Bundler::BundlerError => e
|
13
|
-
warn e.message
|
14
|
-
warn 'Run `bundle install` to install missing gems'
|
15
|
-
exit e.status_code
|
16
|
-
end
|
17
|
-
|
18
|
-
require 'rubocop/rake_task'
|
19
|
-
require 'rake/testtask'
|
20
|
-
require_relative 'lib/rubocop/cop/generator'
|
21
|
-
|
22
|
-
Rake::TestTask.new do |t|
|
23
|
-
t.libs << 'test'
|
24
|
-
t.libs << 'lib'
|
25
|
-
t.test_files = FileList['test/**/*_test.rb']
|
26
|
-
end
|
27
|
-
|
28
|
-
desc 'Run RuboCop over itself'
|
29
|
-
RuboCop::RakeTask.new(:internal_investigation)
|
30
|
-
|
31
|
-
task default: %i[
|
32
|
-
documentation_syntax_check
|
33
|
-
test
|
34
|
-
internal_investigation
|
35
|
-
]
|
36
|
-
|
37
|
-
desc 'Generate a new cop template'
|
38
|
-
task :new_cop, [:cop] do |_task, args|
|
39
|
-
require 'rubocop'
|
40
|
-
|
41
|
-
cop_name = args.fetch(:cop) do
|
42
|
-
warn 'usage: bundle exec rake new_cop[Department/Name]'
|
43
|
-
exit!
|
44
|
-
end
|
45
|
-
|
46
|
-
generator = RuboCop::Cop::Generator.new(cop_name)
|
47
|
-
|
48
|
-
generator.write_source
|
49
|
-
generator.write_test
|
50
|
-
generator.inject_require(root_file_path: 'lib/rubocop/cop/minitest_cops.rb')
|
51
|
-
generator.inject_config(config_file_path: 'config/default.yml')
|
52
|
-
|
53
|
-
puts generator.todo
|
54
|
-
end
|
55
|
-
|
56
|
-
def bump_minor_version
|
57
|
-
major, minor, _patch = RuboCop::Minitest::Version::STRING.split('.')
|
58
|
-
|
59
|
-
"#{major}.#{minor.succ}"
|
60
|
-
end
|
data/bin/console
DELETED
data/bin/setup
DELETED
data/codespell.txt
DELETED
File without changes
|
data/docs/antora.yml
DELETED
data/docs/modules/ROOT/nav.adoc
DELETED
@@ -1,55 +0,0 @@
|
|
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
|
-
|
12
|
-
// START_COP_LIST
|
13
|
-
|
14
|
-
=== Department xref:cops_minitest.adoc[Minitest]
|
15
|
-
|
16
|
-
* xref:cops_minitest.adoc#minitestassertempty[Minitest/AssertEmpty]
|
17
|
-
* xref:cops_minitest.adoc#minitestassertemptyliteral[Minitest/AssertEmptyLiteral]
|
18
|
-
* xref:cops_minitest.adoc#minitestassertequal[Minitest/AssertEqual]
|
19
|
-
* xref:cops_minitest.adoc#minitestassertindelta[Minitest/AssertInDelta]
|
20
|
-
* xref:cops_minitest.adoc#minitestassertincludes[Minitest/AssertIncludes]
|
21
|
-
* xref:cops_minitest.adoc#minitestassertinstanceof[Minitest/AssertInstanceOf]
|
22
|
-
* xref:cops_minitest.adoc#minitestassertkindof[Minitest/AssertKindOf]
|
23
|
-
* xref:cops_minitest.adoc#minitestassertmatch[Minitest/AssertMatch]
|
24
|
-
* xref:cops_minitest.adoc#minitestassertnil[Minitest/AssertNil]
|
25
|
-
* xref:cops_minitest.adoc#minitestassertoutput[Minitest/AssertOutput]
|
26
|
-
* xref:cops_minitest.adoc#minitestassertpathexists[Minitest/AssertPathExists]
|
27
|
-
* xref:cops_minitest.adoc#minitestassertpredicate[Minitest/AssertPredicate]
|
28
|
-
* xref:cops_minitest.adoc#minitestassertrespondto[Minitest/AssertRespondTo]
|
29
|
-
* xref:cops_minitest.adoc#minitestassertsilent[Minitest/AssertSilent]
|
30
|
-
* xref:cops_minitest.adoc#minitestasserttruthy[Minitest/AssertTruthy]
|
31
|
-
* xref:cops_minitest.adoc#minitestassertwithexpectedargument[Minitest/AssertWithExpectedArgument]
|
32
|
-
* xref:cops_minitest.adoc#minitestassertioninlifecyclehook[Minitest/AssertionInLifecycleHook]
|
33
|
-
* xref:cops_minitest.adoc#minitestduplicatetestrun[Minitest/DuplicateTestRun]
|
34
|
-
* xref:cops_minitest.adoc#minitestglobalexpectations[Minitest/GlobalExpectations]
|
35
|
-
* xref:cops_minitest.adoc#minitestliteralasactualargument[Minitest/LiteralAsActualArgument]
|
36
|
-
* xref:cops_minitest.adoc#minitestmultipleassertions[Minitest/MultipleAssertions]
|
37
|
-
* xref:cops_minitest.adoc#minitestnoassertions[Minitest/NoAssertions]
|
38
|
-
* xref:cops_minitest.adoc#minitestrefuteempty[Minitest/RefuteEmpty]
|
39
|
-
* xref:cops_minitest.adoc#minitestrefuteequal[Minitest/RefuteEqual]
|
40
|
-
* xref:cops_minitest.adoc#minitestrefutefalse[Minitest/RefuteFalse]
|
41
|
-
* xref:cops_minitest.adoc#minitestrefuteindelta[Minitest/RefuteInDelta]
|
42
|
-
* xref:cops_minitest.adoc#minitestrefuteincludes[Minitest/RefuteIncludes]
|
43
|
-
* xref:cops_minitest.adoc#minitestrefuteinstanceof[Minitest/RefuteInstanceOf]
|
44
|
-
* xref:cops_minitest.adoc#minitestrefutekindof[Minitest/RefuteKindOf]
|
45
|
-
* xref:cops_minitest.adoc#minitestrefutematch[Minitest/RefuteMatch]
|
46
|
-
* xref:cops_minitest.adoc#minitestrefutenil[Minitest/RefuteNil]
|
47
|
-
* xref:cops_minitest.adoc#minitestrefutepathexists[Minitest/RefutePathExists]
|
48
|
-
* xref:cops_minitest.adoc#minitestrefutepredicate[Minitest/RefutePredicate]
|
49
|
-
* xref:cops_minitest.adoc#minitestrefuterespondto[Minitest/RefuteRespondTo]
|
50
|
-
* xref:cops_minitest.adoc#minitestskipensure[Minitest/SkipEnsure]
|
51
|
-
* xref:cops_minitest.adoc#minitesttestmethodname[Minitest/TestMethodName]
|
52
|
-
* xref:cops_minitest.adoc#minitestunreachableassertion[Minitest/UnreachableAssertion]
|
53
|
-
* xref:cops_minitest.adoc#minitestunspecifiedexception[Minitest/UnspecifiedException]
|
54
|
-
|
55
|
-
// END_COP_LIST
|