Skip to content

Commit

Permalink
Enable and configure Naming/InclusiveLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
tjwp committed Jul 5, 2021
1 parent 5fe88eb commit 293b13a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rubocop-shopify (2.1.0)
rubocop (~> 1.17)
rubocop (~> 1.18)

GEM
remote: https://rubygems.org/
Expand Down
2 changes: 1 addition & 1 deletion rubocop-shopify.gemspec
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |s|
"allowed_push_host" => "https://rubygems.org",
}

s.add_dependency("rubocop", "~> 1.17")
s.add_dependency("rubocop", "~> 1.18")
end
12 changes: 11 additions & 1 deletion rubocop.yml
Expand Up @@ -340,7 +340,17 @@ Naming/HeredocDelimiterNaming:
Enabled: false

Naming/InclusiveLanguage:
Enabled: false
Enabled: true
FlaggedTerms:
master:
Suggestions:
- main
- primary
- leader
AllowedRegex:
- !ruby/regexp '/master[_\s\.]key/' # Rails master key
- 'blob/master/'
- 'origin/master'

Naming/MemoizedInstanceVariableName:
Enabled: false
Expand Down
11 changes: 10 additions & 1 deletion test/fixtures/full_config.yml
Expand Up @@ -1857,7 +1857,7 @@ Naming/HeredocDelimiterNaming:
- !ruby/regexp /(^|\s)(EO[A-Z]{1}|END)(\s|$)/
Naming/InclusiveLanguage:
Description: Recommend the use of inclusive language instead of problematic terms.
Enabled: false
Enabled: true
VersionAdded: '1.18'
CheckIdentifiers: true
CheckConstants: true
Expand All @@ -1882,6 +1882,15 @@ Naming/InclusiveLanguage:
- replica
- secondary
- follower
master:
Suggestions:
- main
- primary
- leader
AllowedRegex:
- !ruby/regexp /master[_\s\.]key/
- blob/master/
- origin/master
Naming/MemoizedInstanceVariableName:
Description: Memoized method name should match memo instance variable name.
Enabled: false
Expand Down

0 comments on commit 293b13a

Please sign in to comment.