From 1f380d24a0b5920ff633909f701022aa00e8f67c Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 23 Jun 2021 19:01:05 +0900 Subject: [PATCH] Suppress `Naming/InclusiveLanguage` warn Follow up https://github.com/rubocop/rubocop/pull/9842. --- .rubocop.yml | 19 +++++++++++++++++++ spec/rubocop/cop/rails/http_status_spec.rb | 2 +- tasks/cut_release.rake | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 48baf467ec..93016e74b8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,6 +19,25 @@ AllCops: InternalAffairs/NodeMatcherDirective: Enabled: false +Naming/InclusiveLanguage: + # These are excluded for compatible API names. RuboCop Rails 3.0 will fix it. + Exclude: + - lib/rubocop/cop/rails/dynamic_find_by.rb + - lib/rubocop/cop/rails/skips_model_validations.rb + - spec/rubocop/cop/rails/dynamic_find_by_spec.rb + - spec/rubocop/cop/rails/skips_model_validations_spec.rb + FlaggedTerms: + whitelist: + Suggestions: + - allowlist + blacklist: + Suggestions: + - denylist + master: + AllowedRegex: + - 'blob/master/' + - 'master \(unreleased\)' + Naming/PredicateName: # Method define macros for dynamically generated method. MethodDefinitionMacros: diff --git a/spec/rubocop/cop/rails/http_status_spec.rb b/spec/rubocop/cop/rails/http_status_spec.rb index 204350fd23..4500be01ce 100644 --- a/spec/rubocop/cop/rails/http_status_spec.rb +++ b/spec/rubocop/cop/rails/http_status_spec.rb @@ -111,7 +111,7 @@ RUBY end - it 'does not register an offense when using whitelisted symbols' do + it 'does not register an offense when using allowed symbols' do expect_no_offenses(<<~RUBY) render :foo, status: :error render :foo, status: :success diff --git a/tasks/cut_release.rake b/tasks/cut_release.rake index 53a90533e2..556a984fee 100644 --- a/tasks/cut_release.rake +++ b/tasks/cut_release.rake @@ -39,7 +39,7 @@ namespace :cut_release do File.open('docs/antora.yml', 'w') do |f| f << antora_metadata.sub( - 'version: master', + 'version: master', # rubocop:disable Naming/InclusiveLanguage "version: '#{version_sans_patch(new_version)}'" ) end