Skip to content

Commit

Permalink
Support AutoCorrect: contextual option for LSP
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Jun 3, 2024
1 parent d840f0b commit ff9bf2a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

- Support `AutoCorrect: contextual` option for LSP. ([@ydah])

## 2.28.3 (2024-04-11)

- Fix an error for Ambiguous cop name `RSpec/Rails/HttpStatus`. ([@ydah])
Expand Down
2 changes: 2 additions & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ RSpecRails/MinitestAssertions:

RSpecRails/NegationBeValid:
Description: Enforces use of `be_invalid` or `not_to` for negated be_valid.
AutoCorrect: contextual
Safe: false
EnforcedStyle: not_to
SupportedStyles:
- not_to
- be_invalid
Enabled: pending
VersionAdded: '2.23'
VersionChanged: "<<next>>"
Reference: https://www.rubydoc.info/gems/rubocop-rspec_rails/RuboCop/Cop/RSpecRails/NegationBeValid

RSpecRails/TravelAround:
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_rspecrails.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ expect(a).to be(false)
| Pending
| No
| Always (Unsafe)
| Command-line only (Unsafe)
| 2.23
| -
| <<next>>
|===
Enforces use of `be_invalid` or `not_to` for negated be_valid.
Expand Down
2 changes: 1 addition & 1 deletion rubocop-rspec_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
'rubygems_mfa_required' => 'true'
}

spec.add_runtime_dependency 'rubocop', '~> 1.40'
spec.add_runtime_dependency 'rubocop', '~> 1.61'
end

0 comments on commit ff9bf2a

Please sign in to comment.