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 4, 2024
1 parent 2051d01 commit 0faa678
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Master (Unreleased)

- Fix a false positive for `FactoryBot/AssociationStyle` when using nested factories with traits. ([@jaydorsey])
- Support `AutoCorrect: contextual` option for LSP. ([@ydah])

## 2.25.1 (2024-01-08)

Expand Down
3 changes: 2 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ FactoryBot/ConsistentParenthesesStyle:
FactoryBot/CreateList:
Description: Checks for create_list usage.
Enabled: true
AutoCorrect: contextual
Include:
- "**/*_spec.rb"
- "**/spec/**/*"
Expand All @@ -61,7 +62,7 @@ FactoryBot/CreateList:
ExplicitOnly: false
SafeAutoCorrect: false
VersionAdded: '1.25'
VersionChanged: '2.24'
VersionChanged: "<<next>>"
Reference: https://www.rubydoc.info/gems/rubocop-factory_bot/RuboCop/Cop/FactoryBot/CreateList

FactoryBot/ExcessiveCreateList:
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/cops_factorybot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ build :user
| Enabled
| Yes
| Always (Unsafe)
| Command-line only (Unsafe)
| 1.25
| 2.24
| <<next>>
|===
Checks for create_list usage.
Expand Down

0 comments on commit 0faa678

Please sign in to comment.