From 46331b4e60a3d5b2abd5549f4032382e2ac3ec97 Mon Sep 17 00:00:00 2001 From: Dan Duvall Date: Mon, 23 Feb 2015 11:31:03 -0800 Subject: [PATCH] Configure Style/TrivialAccessors to use exact matching 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. https://github.com/bbatsov/rubocop/issues/1673 Change-Id: I90dfd2114e9c47e2045bfa131db3654e0bc3d783 --- .rubocop.yml | 3 +++ .rubocop_todo.yml | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index dde895d..20e07cd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -20,3 +20,6 @@ Style/FileName: Style/SignalException: Enabled: false + +Style/TrivialAccessors: + ExactNameMatch: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 65811e0..4c6e6c3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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: