Skip to content

Commit

Permalink
Configure Style/TrivialAccessors to use exact matching
Browse files Browse the repository at this point in the history
The `Style/TrivialAccessors` rule matches method names which are
different from their exposed instance variable names, effectively
disallowing some necessary method implementations. Configuring the rule
to use exact matching makes it more congruent with the style guide rule.

An upstream issue has been opened to make this the default.
rubocop/rubocop#1673

Change-Id: I90dfd2114e9c47e2045bfa131db3654e0bc3d783
  • Loading branch information
marxarelli committed Feb 23, 2015
1 parent 6352021 commit 46331b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Style/FileName:

Style/SignalException:
Enabled: false

Style/TrivialAccessors:
ExactNameMatch: true
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
Style/StringLiterals:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
Style/TrivialAccessors:
Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
Style/UnneededPercentQ:
Expand Down

0 comments on commit 46331b4

Please sign in to comment.