rubocop-minitest 0.15.1 → 0.15.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/spell_checking.yml +33 -0
- data/.rubocop.yml +0 -3
- data/.yardopts +3 -0
- data/CHANGELOG.md +6 -0
- data/codespell.txt +0 -0
- data/config/default.yml +1 -2
- data/docs/modules/ROOT/pages/cops_minitest.adoc +5 -3
- data/lib/rubocop/cop/minitest/assert_empty_literal.rb +1 -1
- data/lib/rubocop/cop/minitest/assert_with_expected_argument.rb +3 -2
- data/lib/rubocop/minitest/version.rb +1 -1
- data/relnotes/v0.15.2.md +5 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8c46717c1b414495df0bdd66c1733962dc3f1ded4547a671abde61c4b262903
|
4
|
+
data.tar.gz: d0ef47f1db7c7d665749e90cdf15df05b5be27226828c4108d0b95755b1cffc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0f124d91add6696ce7d74104be315156395efb07c3c312acaa767158fd4ac25477e1e70120ace728068e1f484d64d3934cb6578d1fba4e397d53537b1bf2c2d
|
7
|
+
data.tar.gz: 72c3a8f9c53a837f1c3564e1eba047fac0dfdd900adcbcf35ec234c7202358fcd9b1e8b7208e7e929dfa447fa3de81f5fb731608224bfcf6285567376d921fee
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Spell Checking
|
2
|
+
|
3
|
+
on: [pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
codespell:
|
7
|
+
name: Check spelling of all files with codespell
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
python-version: [3.8]
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Python ${{ matrix.python-version }}
|
15
|
+
uses: actions/setup-python@v2
|
16
|
+
with:
|
17
|
+
python-version: ${{ matrix.python-version }}
|
18
|
+
- name: Install dependencies
|
19
|
+
run: |
|
20
|
+
python -m pip install --upgrade pip
|
21
|
+
pip install codespell
|
22
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
23
|
+
- name: Check spelling with codespell
|
24
|
+
run: codespell --ignore-words=codespell.txt || exit 1
|
25
|
+
misspell:
|
26
|
+
name: Check spelling of all files in commit with misspell
|
27
|
+
runs-on: ubuntu-latest
|
28
|
+
steps:
|
29
|
+
- uses: actions/checkout@v2
|
30
|
+
- name: Install
|
31
|
+
run: wget -O - -q https://git.io/misspell | sh -s -- -b .
|
32
|
+
- name: Misspell
|
33
|
+
run: git ls-files --empty-directory | xargs ./misspell -error
|
data/.rubocop.yml
CHANGED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 0.15.2 (2021-10-11)
|
6
|
+
|
7
|
+
### Bug fixes
|
8
|
+
|
9
|
+
* [#144](https://github.com/rubocop/rubocop-minitest/pull/144): Mark `Minitest/AssertEmptyLiteral` as safe auto-correction. ([@koic][])
|
10
|
+
|
5
11
|
## 0.15.1 (2021-09-26)
|
6
12
|
|
7
13
|
### Bug fixes
|
data/codespell.txt
ADDED
File without changes
|
data/config/default.yml
CHANGED
@@ -11,9 +11,8 @@ Minitest/AssertEmpty:
|
|
11
11
|
VersionAdded: '0.2'
|
12
12
|
|
13
13
|
Minitest/AssertEmptyLiteral:
|
14
|
-
Description: 'This cop enforces the test to use `assert_empty` instead of using `
|
14
|
+
Description: 'This cop enforces the test to use `assert_empty` instead of using `assert_equal([], object)`.'
|
15
15
|
Enabled: true
|
16
|
-
SafeAutoCorrect: false
|
17
16
|
VersionAdded: '0.5'
|
18
17
|
VersionChanged: '0.11'
|
19
18
|
|
@@ -39,13 +39,13 @@ assert_empty(object, 'message')
|
|
39
39
|
|
40
40
|
| Enabled
|
41
41
|
| Yes
|
42
|
-
| Yes
|
42
|
+
| Yes
|
43
43
|
| 0.5
|
44
44
|
| 0.11
|
45
45
|
|===
|
46
46
|
|
47
47
|
This cop enforces the test to use `assert_empty`
|
48
|
-
instead of using `assert_equal([], object)`.
|
48
|
+
instead of using `assert_equal([], object)` or `assert_equal({}, object)`.
|
49
49
|
|
50
50
|
=== Examples
|
51
51
|
|
@@ -458,7 +458,9 @@ assert(actual, 'message')
|
|
458
458
|
This cop tries to detect when a user accidentally used
|
459
459
|
`assert` when they meant to use `assert_equal`.
|
460
460
|
|
461
|
-
|
461
|
+
=== Safety
|
462
|
+
|
463
|
+
This cop is unsafe because it is not possible to determine
|
462
464
|
whether the second argument of `assert` is a message or not.
|
463
465
|
|
464
466
|
=== Examples
|
@@ -6,8 +6,9 @@ module RuboCop
|
|
6
6
|
# This cop tries to detect when a user accidentally used
|
7
7
|
# `assert` when they meant to use `assert_equal`.
|
8
8
|
#
|
9
|
-
#
|
10
|
-
#
|
9
|
+
# @safety
|
10
|
+
# This cop is unsafe because it is not possible to determine
|
11
|
+
# whether the second argument of `assert` is a message or not.
|
11
12
|
#
|
12
13
|
# @example
|
13
14
|
# # bad
|
data/relnotes/v0.15.2.md
ADDED
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.15.
|
4
|
+
version: 0.15.2
|
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: 2021-
|
13
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubocop
|
@@ -60,9 +60,11 @@ files:
|
|
60
60
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
61
61
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
62
62
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
63
|
+
- ".github/workflows/spell_checking.yml"
|
63
64
|
- ".gitignore"
|
64
65
|
- ".rubocop.yml"
|
65
66
|
- ".rubocop_todo.yml"
|
67
|
+
- ".yardopts"
|
66
68
|
- CHANGELOG.md
|
67
69
|
- CONTRIBUTING.md
|
68
70
|
- Gemfile
|
@@ -71,6 +73,7 @@ files:
|
|
71
73
|
- Rakefile
|
72
74
|
- bin/console
|
73
75
|
- bin/setup
|
76
|
+
- codespell.txt
|
74
77
|
- config/default.yml
|
75
78
|
- docs/antora.yml
|
76
79
|
- docs/modules/ROOT/nav.adoc
|
@@ -144,6 +147,7 @@ files:
|
|
144
147
|
- relnotes/v0.14.0.md
|
145
148
|
- relnotes/v0.15.0.md
|
146
149
|
- relnotes/v0.15.1.md
|
150
|
+
- relnotes/v0.15.2.md
|
147
151
|
- relnotes/v0.2.0.md
|
148
152
|
- relnotes/v0.2.1.md
|
149
153
|
- relnotes/v0.3.0.md
|