8000 Configure Naming/MemoizedInstanceVariableName in source. · rubyzip/rubyzip@c30d9df · GitHub
[go: up one dir, main page]

Skip to content

Commit c30d9df

Browse files
committed
Configure Naming/MemoizedInstanceVariableName in source.
Rather than turn it off for a whole file, it's better to mark these exceptions in comments.
1 parent f9b161e commit c30d9df

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

.rubocop.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ Metrics/MethodLength:
5050
Exclude:
5151
- 'test/**/*.rb'
5252

53-
# Rubocop confuses these as instances of "memoization".
54-
Naming/MemoizedInstanceVariableName:
55-
Exclude:
56-
- 'lib/zip/extra_field/old_unix.rb'
57-
- 'lib/zip/extra_field/unix.rb'
58-
5953
# Set a consistent way of checking types.
6054
Style/ClassCheck:
6155
EnforcedStyle: kind_of?

lib/zip/extra_field/old_unix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def merge(binstr)
2525
@uid ||= uid
2626
@gid ||= gid
2727
@atime ||= atime
28-
@mtime ||= mtime
28+
@mtime ||= mtime # rubocop:disable Naming/MemoizedInstanceVariableName
2929
end
3030

3131
def ==(other)

lib/zip/extra_field/unix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def merge(binstr)
2121

2222
uid, gid = content.unpack('vv')
2323
@uid ||= uid
24-
@gid ||= gid
24+
@gid ||= gid # rubocop:disable Naming/MemoizedInstanceVariableName
2525
end
2626

2727
def ==(other)

0 commit comments

Comments
 (0)
0