From 0faa6785c5a2704a3bf575581c71ad31059bbed8 Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 5 Jun 2024 01:23:29 +0900 Subject: [PATCH] Support `AutoCorrect: contextual` option for LSP Follow up: https://github.com/rubocop/rubocop-rspec/pull/1899 --- CHANGELOG.md | 1 + config/default.yml | 3 ++- docs/modules/ROOT/pages/cops_factorybot.adoc | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68efc824..5df67844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/config/default.yml b/config/default.yml index 77de727b..102130fb 100644 --- a/config/default.yml +++ b/config/default.yml @@ -49,6 +49,7 @@ FactoryBot/ConsistentParenthesesStyle: FactoryBot/CreateList: Description: Checks for create_list usage. Enabled: true + AutoCorrect: contextual Include: - "**/*_spec.rb" - "**/spec/**/*" @@ -61,7 +62,7 @@ FactoryBot/CreateList: ExplicitOnly: false SafeAutoCorrect: false VersionAdded: '1.25' - VersionChanged: '2.24' + VersionChanged: "<>" Reference: https://www.rubydoc.info/gems/rubocop-factory_bot/RuboCop/Cop/FactoryBot/CreateList FactoryBot/ExcessiveCreateList: diff --git a/docs/modules/ROOT/pages/cops_factorybot.adoc b/docs/modules/ROOT/pages/cops_factorybot.adoc index ecd089ec..5d535e78 100644 --- a/docs/modules/ROOT/pages/cops_factorybot.adoc +++ b/docs/modules/ROOT/pages/cops_factorybot.adoc @@ -255,9 +255,9 @@ build :user | Enabled | Yes -| Always (Unsafe) +| Command-line only (Unsafe) | 1.25 -| 2.24 +| <> |=== Checks for create_list usage.