From 7978abb85edab818a4d8a7e81e586d2dc17430bb Mon Sep 17 00:00:00 2001 From: Robert Haines Date: Sun, 22 Sep 2019 17:32:00 +0100 Subject: [PATCH] Configure Naming/MemoizedInstanceVariableName cop. --- .rubocop.yml | 6 ++++++ .rubocop_todo.yml | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 978750d..d40eabc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,12 @@ Lint/UselessComparison: Exclude: - 'test/entry_test.rb' +# Rubocop confuses these as instances of "memoization". +Naming/MemoizedInstanceVariableName: + Exclude: + - 'lib/zip/extra_field/old_unix.rb' + - 'lib/zip/extra_field/unix.rb' + # Allow this multi-line block chain as it actually reads better # than the alternatives. Style/MultilineBlockChain: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index df5c84f..47c6e63 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -69,14 +69,6 @@ Naming/BlockParameterName: - 'test/output_stream_test.rb' - 'test/test_helper.rb' -# Offense count: 2 -# Configuration parameters: EnforcedStyleForLeadingUnderscores. -# SupportedStylesForLeadingUnderscores: disallowed, required, optional -Naming/MemoizedInstanceVariableName: - Exclude: - - 'lib/zip/extra_field/old_unix.rb' - - 'lib/zip/extra_field/unix.rb' - # Offense count: 140 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. # AllowedNames: io, id, to, by, on, in, at, ip, db, os