Skip to content

Commit

Permalink
Fix/configure Style/AccessorGrouping cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed May 23, 2021
1 parent fa5cfcd commit 201ad14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Naming/VariableNumber:
Exclude:
- 'test/file_permissions_test.rb'

# Need to allow accessors in Entry to be separated for doc purposes.
Style/AccessorGrouping:
Exclude:
- 'lib/zip/entry.rb'

# Set a consistent way of checking types.
Style/ClassCheck:
EnforcedStyle: kind_of?
Expand Down
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ Naming/AccessorMethodName:
- 'lib/zip/input_stream.rb'
- 'lib/zip/streamable_stream.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: separated, grouped
Style/AccessorGrouping:
Exclude:
- 'lib/zip/decompressor.rb'
- 'lib/zip/entry.rb'

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
3 changes: 1 addition & 2 deletions lib/zip/decompressor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def self.find_by_compression_method(compression_method)
decompressor_classes[compression_method]
end

attr_reader :input_stream
attr_reader :decompressed_size
attr_reader :decompressed_size, :input_stream

def initialize(input_stream, decompressed_size = nil)
super()
Expand Down

0 comments on commit 201ad14

Please sign in to comment.