8000 Rubocop 0.79 by hainesr · Pull Request #437 · rubyzip/rubyzip · GitHub
[go: up one dir, main page]

Skip to content

Rubocop 0.79 #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 56 commits into from
Feb 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c8bfd14
Update rubocop version and the config files.
hainesr Sep 14, 2019
a3245ac
Add Rubocop tasks to the Rakefile.
hainesr Sep 15, 2019
aa40035
Fix Gemspec/OrderedDependencies cop.
hainesr Feb 8, 2020
73e405a
Fix Security/Open cop errors.
hainesr Sep 14, 2019
f1154c2
Fix Style/OrAssignment cop.
hainesr Feb 9, 2020
3a3ac6f
Fix Style/Semicolon cop.
hainesr Sep 14, 2019
e7275da
Fix Style/BlockDelimiters cop errors.
hainesr Sep 14, 2019
98c6969
Fix Layout/SpaceAroundOperators cop.
hainesr Feb 9, 2020
20743a5
Fix Lint/AmbiguousBlockAssociation cop.
hainesr Feb 9, 2020
b528cae
Fix Lint/LiteralAsCondition cop.
hainesr Feb 9, 2020
8000 cd065d0
Fix Lint/UnusedBlockArgument cop.
hainesr Feb 9, 2020
e361a47
Configure Lint/UselessComparison cop.
hainesr Feb 9, 2020
23ba1af
Fix Lint/RescueException cop.
hainesr Feb 9, 2020
0d49421
Fix Lint/UselessAccessModifier cop.
hainesr Feb 9, 2020
fff2c41
Configure Lint/SuppressedException cop.
hainesr Feb 9, 2020
cfe4972
Fix Layout/EmptyLineAfterGuardClause cop.
hainesr Feb 9, 2020
61c83b2
Configure Layout/HashAlignment cop.
hainesr Feb 9, 2020
68259ed
Fix Style/Encoding cop.
hainesr Feb 9, 2020
70d036b
Fix Style/ExpandPathArguments cop.
hainesr Sep 15, 2019
6544563
Configure Style/ZeroLengthPredicate so it doesn't misfire.
hainesr Feb 9, 2020
19aa7e8
Fix Style/RescueStandardError cop.
hainesr Sep 15, 2019
5a1baf4
Fix Style/RedundantReturn cop.
hainesr Sep 15, 2019
b3c4c37
Fix Style/NonNilCheck cop.
hainesr Sep 15, 2019
b3f2413
Fix Style/CommentedKeyword cop.
hainesr Feb 9, 2020
468a80c
Fix Style/IfInsideElse cop.
hainesr Sep 21, 2019
3121ad0
Fix Style/Alias cop.
hainesr Feb 9, 2020
1b8f1a6
Fix Naming/RescuedExceptionsVariableName cop.
hainesr Sep 21, 2019
bce8416
Fix Style/MixinUsage cop.
hainesr Sep 21, 2019
45f4c2d
Fix Style/GuardClause cop.
hainesr Feb 9, 2020
2e11a88
Fix Style/StringLiterals cop.
hainesr Feb 9, 2020
cc0e372
Configure Style/SymbolArray cop.
hainesr Feb 9, 2020
4e1b679
Fix Style/TrailingCommaInArrayLiteral cop.
hainesr Sep 22, 2019
2dfe092
Fix Style/UnpackFirst cop.
hainesr Sep 22, 2019
41f2359
Configure Style/RegexpLiteral cop.
hainesr Feb 9, 2020
5e32204
Configure Style/MultilineBlockChain cop.
hainesr Feb 9, 2020
172ab4b
Fix Style/FloatDivision cop.
hainesr Sep 22, 2019
d42c66c
Fix Style/MultilineWhenThen cop.
hainesr Sep 22, 2019
2dc9b49
Fix Style/EvalWithLocation cop.
hainesr Sep 22, 2019
835843d
Fix Naming/HeredocDelimiterCase cop.
hainesr Sep 22, 2019
7978abb
Configure Naming/MemoizedInstanceVariableName cop.
hainesr Sep 22, 2019
2f99322
Fix Style/Next cop.
hainesr Sep 25, 2019
2cbdbf1
Fix Style/SignalException cop.
hainesr Sep 26, 2019
bb3b447
Fix Style/SpecialGlobalVars cop.
hainesr Sep 26, 2019
0df6cb3
Fix Style/SymbolProc cop.
hainesr Sep 26, 2019
6cab592
Configure and fix Metrics/LineLength cop.
hainesr Sep 26, 2019
0e25e63
Turn off Metrics/BlockLength for the tests.
hainesr Sep 29, 2019
c97d560
Configure Metrics/AbcSize and turn off for the tests.
hainesr Sep 29, 2019
5ce4e13
Configure and fix Style/ClassCheck cop.
hainesr Sep 30, 2019
a9adfa2
Configure Metrics/ClassLength and turn off for the tests.
hainesr Feb 9, 2020
a187ec0
Configure Metrics/MethodLength and turn off for the tests.
hainesr Feb 9, 2020
4b8f740
Fix Layout/EmptyLinesAroundClassBody cop.
hainesr Feb 9, 2020
fae95e3
Fix Style/NumericLiteralPrefix cop.
hainesr Feb 9, 2020
d07b36b
Fix Style/TernaryParentheses cop.
hainesr Feb 9, 2020
989a565
Fix Style/TrailingCommaInHashLiteral cop.
hainesr Feb 9, 2020
c31ab81
Fix Style/NumericLiterals cop.
hainesr Feb 9, 2020
87a63e0
Set TargetRubyVersion to match that in the gemspec.
hainesr Feb 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Style/TernaryParentheses cop.
  • Loading branch information
hainesr committed Feb 15, 2020
commit d07b36b2e63b2b51feb0a935fe7e7c4bb169c1c3
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,6 @@ Style/SafeNavigation:
- 'test/filesystem/file_nonmutating_test.rb'
- 'test/filesystem/file_stat_test.rb'
- 'test/test_helper.rb'
# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowSafeAssignment.
# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
Style/TernaryParentheses:
Exclude:
- 'lib/zip/crypto/decrypted_io.rb'
- 'lib/zip/inflater.rb'
- 'lib/zip/pass_thru_decompressor.rb'

# Offense count: 1
# Cop supports --auto-correct.
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/crypto/decrypted_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(io, decrypter)
end

def read(length = nil, outbuf = +'')
return ((length.nil? || length.zero?) ? '' : nil) if eof
return (length.nil? || length.zero? ? '' : nil) if eof

while length.nil? || (buffer.bytesize < length)
break if input_finished?
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/inflater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(*args)
end

def read(length = nil, outbuf = '')
return ((length.nil? || length.zero?) ? '' : nil) if eof
return (length.nil? || length.zero? ? '' : nil) if eof

while length.nil? || (@buffer.bytesize < length)
break if input_finished?
Expand Down
2 changes: 1 addition & 1 deletion lib/zip/pass_thru_decompressor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def initialize(*args)
end

def read(length = nil, outbuf = '')
return ((length.nil? || length.zero?) ? '' : nil) if eof
return (length.nil? || length.zero? ? '' : nil) if eof

if length.nil? || (@read_so_far + length) > decompressed_size
length = decompressed_size - @read_so_far
Expand Down
0