Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #9895] Disable Naming/InclusiveLanguage by default #9896

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions .rubocop.yml
Expand Up @@ -100,19 +100,6 @@ Metrics/ModuleLength:
Naming/InclusiveLanguage:
Exclude:
- lib/rubocop/cop/naming/inclusive_language.rb
- spec/rubocop/cop/naming/inclusive_language_spec.rb
FlaggedTerms:
whitelist:
Suggestions:
- allowlist
blacklist:
Suggestions:
- denylist
master:
AllowedRegex:
- 'blob/master/'
- 'master \(unreleased\)'
- !ruby/regexp "/ENV\\['RUBOCOP_VERSION'\\] == 'master'/"

RSpec/FilePath:
Exclude:
Expand Down
@@ -0,0 +1 @@
* [#9895](https://github.com/rubocop/rubocop/issues/9895): Set `CheckStrings: false` and Remove `master` from `FlaggedTerms` for `Naming/InclusiveLanguage`. ([@koic][])
8 changes: 1 addition & 7 deletions config/default.yml
Expand Up @@ -2541,7 +2541,7 @@ Naming/InclusiveLanguage:
CheckIdentifiers: true
CheckConstants: true
CheckVariables: true
CheckStrings: true
CheckStrings: false
CheckSymbols: true
CheckComments: true
CheckFilepaths: true
Expand All @@ -2556,12 +2556,6 @@ Naming/InclusiveLanguage:
Suggestions:
- denylist
- block
master:
Suggestions: ['main', 'primary', 'leader']
AllowedRegex:
- 'Master of None'
- 'Master Boot Record'
- 'Mastercard'
slave:
Suggestions: ['replica', 'secondary', 'follower']

Expand Down
9 changes: 6 additions & 3 deletions spec/rubocop/cop/naming/inclusive_language_spec.rb
Expand Up @@ -136,9 +136,12 @@ class Nodewhitelist

context 'flagged term with three or more suggestions' do
let(:cop_config) do
{ 'FlaggedTerms' => {
'master' => { 'Suggestions' => %w[main primary leader] }
} }
{
'CheckStrings' => true,
'FlaggedTerms' => {
'master' => { 'Suggestions' => %w[main primary leader] }
}
}
end

it 'includes all suggestions in the message' do
Expand Down
2 changes: 1 addition & 1 deletion tasks/cut_release.rake
Expand Up @@ -40,7 +40,7 @@ namespace :cut_release do
def update_docs(old_version, new_version)
update_file('docs/antora.yml') do |antora_metadata|
antora_metadata.sub(
"version: 'master'", # rubocop:disable Naming/InclusiveLanguage
"version: 'master'",
"version: '#{version_sans_patch(new_version)}'"
)
end
Expand Down