From b3870dc26be8334a1abe7a49d1976d9de47d8892 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Tue, 14 Jun 2022 10:27:30 +0900 Subject: [PATCH] Add a setting for "autocorrect" in `Naming/InclusiveLanguage` Follow up: https://github.com/rubocop/rubocop/pull/10714 In this PR, we have made the following word's suggestions - auto-correct -> autocorrect - auto_correct -> autocorrect --- .rubocop.yml | 6 ++++++ docs/modules/ROOT/pages/cops_rspec_factorybot.adoc | 2 +- lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index bbfb6405a..9ffffea56 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -60,6 +60,12 @@ Naming/InclusiveLanguage: Enabled: true CheckStrings: true FlaggedTerms: + auto-correct: + Suggestions: + - autocorrect + auto_correct: + Suggestions: + - autocorrect behaviour: Suggestions: - behavior diff --git a/docs/modules/ROOT/pages/cops_rspec_factorybot.adoc b/docs/modules/ROOT/pages/cops_rspec_factorybot.adoc index a818af922..8534dca2f 100644 --- a/docs/modules/ROOT/pages/cops_rspec_factorybot.adoc +++ b/docs/modules/ROOT/pages/cops_rspec_factorybot.adoc @@ -174,7 +174,7 @@ Use shorthands from `FactoryBot::Syntax::Methods` in your specs. === Safety -The auto-correction is marked as unsafe because the cop +The autocorrection is marked as unsafe because the cop cannot verify whether you already include `FactoryBot::Syntax::Methods` in your test suite. diff --git a/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb b/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb index 3cd374647..24a2e711a 100644 --- a/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb +++ b/lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb @@ -7,7 +7,7 @@ module FactoryBot # Use shorthands from `FactoryBot::Syntax::Methods` in your specs. # # @safety - # The auto-correction is marked as unsafe because the cop + # The autocorrection is marked as unsafe because the cop # cannot verify whether you already include # `FactoryBot::Syntax::Methods` in your test suite. #