From bf0a1698fb69ba226b23b0425989a6d73b60c637 Mon Sep 17 00:00:00 2001 From: Kobus Post Date: Wed, 9 Aug 2023 09:43:29 +0200 Subject: [PATCH 1/2] Allow remaster in Naming/InclusiveLanguage --- rubocop.yml | 1 + test/fixtures/full_config.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/rubocop.yml b/rubocop.yml index 06653173..9e9daa94 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -383,6 +383,7 @@ Naming/InclusiveLanguage: - !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name - 'mastercard' - 'webmaster' + - 'remaster' Naming/MemoizedInstanceVariableName: Enabled: false diff --git a/test/fixtures/full_config.yml b/test/fixtures/full_config.yml index acf8939c..bceca510 100644 --- a/test/fixtures/full_config.yml +++ b/test/fixtures/full_config.yml @@ -2139,6 +2139,7 @@ Naming/InclusiveLanguage: - !ruby/regexp /origin[ \/]master/ - mastercard - webmaster + - remaster Naming/MemoizedInstanceVariableName: Description: Memoized method name should match memo instance variable name. Enabled: false From b2c761616cd2693ff834bd41b78913f0f9a2324f Mon Sep 17 00:00:00 2001 From: Kobus Post Date: Wed, 16 Aug 2023 16:08:51 +0200 Subject: [PATCH 2/2] Allow all instances of 'master' as part of another word --- rubocop.yml | 4 +--- test/fixtures/full_config.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/rubocop.yml b/rubocop.yml index 9e9daa94..b0afb085 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -381,9 +381,7 @@ Naming/InclusiveLanguage: - !ruby/regexp /\w*:\/\/\S+/ # URLs (e.g. https://github.com/org/repo/blob/master/README.md) - !ruby/regexp '/(?:blob|tree)/master/' # e.g. github.com/org/repo/blob/master/README.md, without https:// - !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name - - 'mastercard' - - 'webmaster' - - 'remaster' + - !ruby/regexp '/(?<=[a-z])master|master(?=[a-z])/' # "master" substring within a longer word Naming/MemoizedInstanceVariableName: Enabled: false diff --git a/test/fixtures/full_config.yml b/test/fixtures/full_config.yml index bceca510..a27f0c45 100644 --- a/test/fixtures/full_config.yml +++ b/test/fixtures/full_config.yml @@ -2137,9 +2137,7 @@ Naming/InclusiveLanguage: - !ruby/regexp /\w*:\/\/\S+/ - !ruby/regexp /(?:blob|tree)\/master/ - !ruby/regexp /origin[ \/]master/ - - mastercard - - webmaster - - remaster + - !ruby/regexp /(?<=[a-z])master|master(?=[a-z])/ Naming/MemoizedInstanceVariableName: Description: Memoized method name should match memo instance variable name. Enabled: false