Skip to content

Commit b2c7616

Browse files
committed
Allow all instances of 'master' as part of another word
1 parent bf0a169 commit b2c7616

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

rubocop.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,7 @@ Naming/InclusiveLanguage:
381381
- !ruby/regexp /\w*:\/\/\S+/ # URLs (e.g. https://github.com/org/repo/blob/master/README.md)
382382
- !ruby/regexp '/(?:blob|tree)/master/' # e.g. github.com/org/repo/blob/master/README.md, without https://
383383
- !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name
384-
- 'mastercard'
385-
- 'webmaster'
386-
- 'remaster'
384+
- !ruby/regexp '/(?<=[a-z])master|master(?=[a-z])/' # "master" substring within a longer word
387385

388386
Naming/MemoizedInstanceVariableName:
389387
Enabled: false

test/fixtures/full_config.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,9 +2137,7 @@ Naming/InclusiveLanguage:
21372137
- !ruby/regexp /\w*:\/\/\S+/
21382138
- !ruby/regexp /(?:blob|tree)\/master/
21392139
- !ruby/regexp /origin[ \/]master/
2140-
- mastercard
2141-
- webmaster
2142-
- remaster
2140+
- !ruby/regexp /(?<=[a-z])master|master(?=[a-z])/
21432141
Naming/MemoizedInstanceVariableName:
21442142
Description: Memoized method name should match memo instance variable name.
21452143
Enabled: false

0 commit comments

Comments
 (0)