Skip to content

Commit

Permalink
Merge pull request #1904 from rubocop/prerelease
Browse files Browse the repository at this point in the history
Release v3.0.0.pre
  • Loading branch information
bquorning authored Jun 10, 2024
2 parents eaf53f4 + 130655b commit c414297
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 88 deletions.
66 changes: 2 additions & 64 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Style/RequireOrder:
Enabled: true

RSpec/SpecFilePathFormat:
Enabled: true
Exclude:
- spec/rubocop/cop/rspec/mixin/**/*.rb

Expand Down Expand Up @@ -253,66 +252,5 @@ Style/SwapValues: {Enabled: true}
Style/YAMLFileRead: {Enabled: true}

# Enable our own pending cops.

RSpec/BeEmpty:
Enabled: true
RSpec/BeEq:
Enabled: true
RSpec/BeNil:
Enabled: true
RSpec/ChangeByZero:
Enabled: true
RSpec/ClassCheck:
Enabled: true
RSpec/ContainExactly:
Enabled: true
RSpec/DuplicatedMetadata:
Enabled: true
RSpec/EmptyMetadata:
Enabled: true
RSpec/EmptyOutput:
Enabled: true
RSpec/Eq:
Enabled: true
RSpec/ExcessiveDocstringSpacing:
Enabled: true
RSpec/ExpectInLet:
Enabled: true
RSpec/IdenticalEqualityAssertion:
Enabled: true
RSpec/IndexedLet:
Enabled: true
RSpec/IsExpectedSpecify:
Enabled: true
RSpec/MatchArray:
Enabled: true
RSpec/MetadataStyle:
Enabled: true
RSpec/MissingExpectationTargetMethod:
Enabled: true
RSpec/NoExpectationExample:
Enabled: true
RSpec/PendingWithoutReason:
Enabled: true
RSpec/ReceiveMessages:
Enabled: true
RSpec/RedundantAround:
Enabled: true
RSpec/RedundantPredicateMatcher:
Enabled: true
RSpec/RemoveConst:
Enabled: true
RSpec/RepeatedSubjectCall:
Enabled: true
RSpec/SkipBlockInsideExample:
Enabled: true
RSpec/SortMetadata:
Enabled: true
RSpec/SpecFilePathSuffix:
Enabled: true
RSpec/SubjectDeclaration:
Enabled: true
RSpec/UndescriptiveLiteralsDescription:
Enabled: true
RSpec/VerifiedDoubleReference:
Enabled: true
#
# No pending cops yet.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

## 3.0.0.pre (2024-06-05)

- Remove extracted cops in `Capybara`, `FactoryBot` and `Rails` departments. ([@ydah])
- Remove `RuboCop::RSpec::Language::NodePattern`. ([@ydah])
- Remove `RSpec/FilePath` cop. ([@ydah])
Expand All @@ -10,6 +12,8 @@
- Add new `RSpec/MissingExpectationTargetMethod` cop. ([@krororo])
- Fix an error for `RSpec/ScatteredSetup` when one of the hooks is an empty block. ([@earlopain])

Read more about how to upgrade in https://docs.rubocop.org/rubocop-rspec/upgrade_to_version_3.html

## 2.31.0 (2024-06-07)

- Support `AutoCorrect: contextual` option for LSP. ([@ydah])
Expand Down
22 changes: 11 additions & 11 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ RSpec/BeEmpty:
Enabled: true
AutoCorrect: contextual
VersionAdded: '2.20'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/BeEmpty

RSpec/BeEq:
Expand Down Expand Up @@ -316,15 +316,15 @@ RSpec/EmptyExampleGroup:
AutoCorrect: contextual
SafeAutoCorrect: false
VersionAdded: '1.7'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyExampleGroup

RSpec/EmptyHook:
Description: Checks for empty before and after hooks.
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.39'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyHook

RSpec/EmptyLineAfterExample:
Expand Down Expand Up @@ -370,7 +370,7 @@ RSpec/EmptyMetadata:
Enabled: true
AutoCorrect: contextual
VersionAdded: '2.24'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/EmptyMetadata

RSpec/EmptyOutput:
Expand Down Expand Up @@ -471,7 +471,7 @@ RSpec/Focus:
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.5'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/Focus

RSpec/HookArgument:
Expand All @@ -491,7 +491,7 @@ RSpec/HooksBeforeExamples:
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.29'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/HooksBeforeExamples

RSpec/IdenticalEqualityAssertion:
Expand Down Expand Up @@ -599,7 +599,7 @@ RSpec/LetBeforeExamples:
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.16'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetBeforeExamples

RSpec/LetSetup:
Expand Down Expand Up @@ -659,8 +659,8 @@ RSpec/MissingExampleGroupArgument:

RSpec/MissingExpectationTargetMethod:
Description: Checks if `.to`, `not_to` or `to_not` are used.
Enabled: pending
VersionAdded: "<<next>>"
Enabled: true
VersionAdded: '3.0'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MissingExpectationTargetMethod

RSpec/MultipleDescribes:
Expand Down Expand Up @@ -857,15 +857,15 @@ RSpec/ScatteredLet:
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.14'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredLet

RSpec/ScatteredSetup:
Description: Checks for setup scattered across multiple hooks in an example group.
Enabled: true
AutoCorrect: contextual
VersionAdded: '1.10'
VersionChanged: "<<next>>"
VersionChanged: '2.31'
Reference: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ScatteredSetup

RSpec/SharedContext:
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rubocop-rspec
title: RuboCop RSpec
version: ~
version: '3.0'
nav:
- modules/ROOT/nav.adoc
22 changes: 11 additions & 11 deletions docs/modules/ROOT/pages/cops_rspec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ expect(foo).to be(true)
| Yes
| Command-line only
| 2.20
| <<next>>
| 2.31
|===
Prefer using `be_empty` when checking for an empty array.
Expand Down Expand Up @@ -1155,7 +1155,7 @@ describe 'Something', :a
| Yes
| Command-line only (Unsafe)
| 1.7
| <<next>>
| 2.31
|===
Checks if an example group does not include any tests.
Expand Down Expand Up @@ -1209,7 +1209,7 @@ end
| Yes
| Command-line only
| 1.39
| <<next>>
| 2.31
|===
Checks for empty before and after hooks.
Expand Down Expand Up @@ -1512,7 +1512,7 @@ let(:foo) { bar }
| Yes
| Command-line only
| 2.24
| <<next>>
| 2.31
|===
Avoid empty metadata hash.
Expand Down Expand Up @@ -2129,7 +2129,7 @@ expect { my_app.print_report }.to output('Hello World').to_stdout
| Yes
| Command-line only
| 1.5
| <<next>>
| 2.31
|===
Checks if examples are focused.
Expand Down Expand Up @@ -2291,7 +2291,7 @@ end
| Yes
| Command-line only
| 1.29
| <<next>>
| 2.31
|===
Checks for before/around/after hooks that come after an example.
Expand Down Expand Up @@ -3046,7 +3046,7 @@ end
| Yes
| Command-line only
| 1.16
| <<next>>
| 2.31
|===
Checks for `let` definitions that come after an example.
Expand Down Expand Up @@ -3411,10 +3411,10 @@ end
|===
| Enabled by default | Safe | Supports autocorrection | Version Added | Version Changed
| Pending
| Enabled
| Yes
| No
| <<next>>
| 3.0
| -
|===
Expand Down Expand Up @@ -5038,7 +5038,7 @@ allow(Foo).to receive(:bar).and_return(bar.baz)
| Yes
| Command-line only
| 1.14
| <<next>>
| 2.31
|===
Checks for let scattered across the example group.
Expand Down Expand Up @@ -5081,7 +5081,7 @@ end
| Yes
| Command-line only
| 1.10
| <<next>>
| 2.31
|===
Checks for setup scattered across multiple hooks in an example group.
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rspec/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module RSpec
# Version information for the RSpec RuboCop plugin.
module Version
STRING = '2.29.2'
STRING = '3.0.0.pre'
end
end
end

0 comments on commit c414297

Please sign in to comment.