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

🚨 [security] Upgrade rubocop: 0.48.1 → 0.61.1 (major) #216

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@depfu
Contributor

depfu bot commented Dec 11, 2018


🚨 Your version of rubocop has known security vulnerabilities 🚨

Advisory: CVE-2017-8418
Disclosed: May 01, 2017
URL: https://github.com/bbatsov/rubocop/issues/4336

RuboCop: insecure use of /tmp

RuboCop 0.48.1 and earlier does not use /tmp in safe way, allowing local
users to exploit this to tamper with cache files belonging to other users.


🚨 We recommend to merge and deploy this update as soon as possible! 🚨

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ rubocop (0.48.1 → 0.61.1) · Repo · Changelog

Release Notes

0.61.0

New features

  • #6457: Support inner slash correction on Style/RegexpLiteral. (@r7kamura)
  • #6475: Support brace correction on Style/Lambda. (@r7kamura)
  • #6469: Enforce no parentheses style in the Style/MethodCallWithArgsParentheses cop. (@gsamokovarov)
  • New cop Performance/OpenStruct checks for OpenStruct.new calls. (@xlts)

Bug fixes

  • #6433: Fix Ruby 2.5 Layout/RescueEnsureAlignment error on assigned blocks. (@gmcgibbon)
  • #6405: Fix a false positive for Lint/UselessAssignment when using a variable in a module name. (@itsWill)
  • #5934: Handle the combination of --auto-gen-config and --config FILE correctly. (@jonas054)
  • #5970: Make running --auto-gen-config in a subdirectory work. (@jonas054)
  • #6412: Fix an unknown keywords error when using Psych.safe_load with Ruby 2.6.0-preview2. (@koic)
  • #6436: Fix exit status code to be 130 when rubocop is interrupted. (@deivid-rodriguez)
  • #6443: Fix an incorrect autocorrect for Style/BracesAroundHashParameters when the opening brace is before the first hash element at same line. (@koic)
  • #6445: Treat yield and super like regular method calls in Style/AlignHash. (@mvz)
  • #3301: Don't suggest or make semantic changes to the code in Style/InfiniteLoop. (@jonas054)
  • #3586: Handle single argument spanning multiple lines in Style/TrailingCommaInArguments. (@jonas054)
  • #6478: Fix EmacsComment#encoding to match the coding variable. (@akihiro17)
  • Don't show "unrecognized parameter" warning for inherit_mode parameter to individual cop configurations. (@maxh)
  • #6449: Fix a false negative for Layout/IndentationWidth when setting EnforcedStyle: rails of Layout/IndentationConsistency and method definition indented to access modifier in a singleton class. (@koic)
  • #6482: Fix a false positive for Lint/FormatParameterMismatch when using (digit)$ flag. (@koic)
  • #6489: Fix an error for Style/UnneededCondition when if condition and then branch are the same and it has no else branch. (@koic)
  • Fix NoMethodError for Style/FrozenStringLiteral when a file contains only a shebang. (@takaram)
  • #6511: Fix an incorrect auto-correct for Style/EmptyCaseCondition when used as an argument of a method. (@koic)
  • #6509: Fix an incorrect auto-correct for Style/RaiseArgs when an exception object is assigned to a local variable. (@koic)
  • #6534: Fix a false positive for Lint/UselessAccessModifier when using private_class_method. (@dduugg)
  • #6545: Fix a regression where Performance/RedundantMerge raises an error on a sole double splat argument passed to merge!. (@mmedal)
  • #6360: Detect bad indentation in if nodes even if the first branch is empty. (@bquorning)

Changes

  • #6492: Auto-correct chunks of comment lines in Layout/CommentIndentation to avoid unnecessary iterations for rubocop -a. (@jonas054)

0.60.0

New features

Bug fixes

  • #6330: Fix an error for Rails/ReversibleMigration when using variable assignment. (@koic, @scottmatthewman)
  • #6331: Fix a false positive for Style/RedundantFreeze and a false negative for Style/MutableConstant when assigning a regexp object to a constant. (@koic)
  • #6334: Fix a false negative for Style/RedundantFreeze when assigning a range object to a constant. (@koic)
  • #5538: Fix false negatives in modifier cops when line length cop is disabled. (@drenmi)
  • #6340: Fix an error for Rails/ReversibleMigration when block argument is empty. (@koic)
  • #6274: Fix "[Corrected]" message being displayed even when nothing has been corrected. (@jekuta)
  • #6380: Allow use of a hyphen-separated frozen string literal in Emacs style magic comment. (@y-yagi)
  • Fix and improve LineLength cop for tab-indented code. (@AlexWayfer)

Changes

  • #3727: Enforce single spaces for key option in Layout/AlignHash cop. (@albaer)
  • #6321: Fix run of RuboCop when cache directory is not writable. (@Kevinrob)

0.59.2

Bug fixes

  • #6266: Fix a false positive for Rails/HasManyOrHasOneDependent when using associations of Active Resource. (@tejasbubane, @koic)
  • #6296: Fix an auto-correct error for Style/For when setting EnforcedStyle: each and for dose not have do or semicolon. (@autopp)
  • #6300: Fix a false positive for Layout/EmptyLineAfterGuardClause when guard clause including heredoc. (@koic)
  • #6287: Fix AllowURI option for Metrics/LineLength cop with disabled Layut/Tab cop. (@AlexWayfer)
  • #5338: Move checking of class- and module defining blocks from Metrics/BlockLength into the respective length cops. (@drenmi)
  • #2841: Fix Style/ZeroLengthPredicate false positives when inspecting Tempfile, StringIO, and File::Stat objects. (@drenmi)
  • #6305: Fix infinite loop for Layout/EmptyLinesAroundAccessModifier and Layout/EmptyLinesAroundAccessModifier when specifying a superclass that breaks the line. (@koic)
  • #6007: Fix false positive in Style/IfUnlessModifier when using named capture. (@drenmi)
  • #6311: Prevent Style/Semicolon from breaking on single line if-then-else in assignment. (@drenmi)
  • #6315: Fix an error for Rails/HasManyOrHasOneDependent when an Active Record model does not have any relations. (@koic)
  • #6316: Fix an auto-correct error for Style/For when setting EnforcedStyle: each with range provided to the for loop without a do keyword or semicolon and without enclosing parenthesis. (@lukasz-wojcik)

Changes

  • #6286: Allow exclusion of certain methods for Metrics/MethodLength. (@akanoi)

0.59.1

Bug fixes

  • #6267: Fix undefined method 'method_name' for Rails/FindEach. (@Knack)
  • #6278: Fix false positive for Naming/FileName when investigating gemspecs. (@kddeisz)
  • #6256: Fix false positive for Naming/FileName when investigating dotfiles. (@sinsoku)
  • #6242: Fix Style/EmptyCaseCondition auto-correction removes comment between case and first when. (@koic)
  • #6261: Fix undefined method error for Style/RedundantBegin when calling super with a block. (@eitoball)
  • #6263: Fix an error Layout/EmptyLineAfterGuardClause when guard clause is after heredoc including string interpolation. (@koic)
  • #6281: Fix false negative in Style/MultilineMethodSignature. (@drenmi)
  • #6264: Fix an incorrect autocorrect for Layout/EmptyLineAfterGuardClause cop when if condition is after heredoc. (@koic)

Changes

  • #6272: Make Lint/UnreachableCode detect exit, exit! and abort. (@hoshinotsuyoshi)
  • #6295: Exclude #=== from Naming/BinaryOperatorParameterName. (@zverok)
  • Add + to allowed file names of Naming/FileName. (@yensaki)

0.59.0

New features

  • #6109: Add new Bundler/GemComment cop. (@sunny)
  • #6148: Add IgnoredMethods option to Style/NumericPredicate cop. (@AlexWayfer)
  • #6174: Add --display-only-fail-level-offenses to only output offenses at or above the fail level. (@robotdana)
  • Add autocorrect to Style/For. (@rrosenblum)
  • #6173: Add AllowImplicitReturn option to Rails/SaveBang cop. (@robotdana)
  • #6218: Add comparison style to Style/NilComparison. (@khiav223577)
  • Add new Style/MultilineMethodSignature cop. (@drenmi)
  • #6234: Add Performance/ChainArrayAllocation cop. (@schneems)
  • #6136: Add remote url in remote url download error message. (@ShockwaveNN)
  • #5659: Make Layout/EmptyLinesAroundClassBody aware of specifying a superclass that breaks the line. (@koic)

Bug fixes

  • #6107: Fix indentation of multiline postfix conditionals. (@jaredbeck)
  • #6140: Fix Style/DateTime not detecting #to_datetime. It can be configured to allow this. (@bdewater)
  • #6132: Fix a false negative for Naming/FileName when Include of AllCops is the default setting. (@koic)
  • #4115: Fix false positive for unary operations in Layout/MultilineOperationIndentation. (@jonas054)
  • #6127: Fix an error for Layout/ClosingParenthesisIndentation when method arguments are empty with newlines. (@tatsuyafw)
  • #6152: Fix a false negative for Layout/AccessModifierIndentation when using access modifiers with arguments within nested classes. (@gmalette)
  • #6124: Fix Style/IfUnlessModifier cop for disabled Layout/Tab cop when there is no IndentationWidth config. (@AlexWayfer)
  • #6133: Fix AllowURI option of Metrics/LineLength cop for files with tabs indentation. (@AlexWayfer)
  • #6164: Fix incorrect autocorrect for Style/UnneededCondition when using operator method higher precedence than ||. (@koic)
  • #6138: Fix a false positive for assigning a block local variable in Lint/ShadowedArgument. (@jonas054)
  • #6022: Fix Layout/MultilineHashBraceLayout and Layout/MultilineArrayBraceLayout auto-correct syntax error when there is a comment on the last element. (@bacchir)
  • #6175: Fix Style/BracesAroundHashParameters auto-correct syntax error when there is a trailing comma. (@bacchir)
  • #6192: Make Style/RedundantBegin aware of stabby lambdas. (@drenmi)
  • #6208: Ignore assignment methods in Naming/PredicateName. (@sunny)
  • #6196: Fix incorrect autocorrect for Style/EmptyCaseCondition when using return in when clause and assigning the return value of case. (@koic)
  • #6142: Ignore keyword arguments in Rails/Delegate. (@sunny)
  • #6240: Fix an auto-correct error for Style/WordArray when setting EnforcedStyle: brackets and using string interpolation in %W literal. (@koic)
  • #6202: Fix infinite loop when auto-correcting Lint/RescueEnsureAlignment when end is misaligned. The alignment and message are now based on the beginning position rather than the end position. (@rrosenblum)
  • #6199: Don't recommend Date usage in Style/DateTime. (@deivid-rodriguez)

Changes

  • #6161: Add scope methods to Rails/FindEach cop. Makes the cop also check for the following scopes: eager_load, includes, joins, left_joins, left_outer_joins, preload, references, and unscoped. (@repinel)
  • #6137: Allow db to allowed names of Naming/UncommunicativeMethodParamName cop in default config. (@mkenyon)
  • Update the highlighting of Lint/DuplicateMethods to include the method name. (@rrosenblum)
  • #6057: Return 0 when running rubocop --auto-gen-conf if the todo file is successfully created even if there are offenses. (@MagedMilad)
  • #4301: Turn off autocorrect for Rails/RelativeDateConstant by default. (@koic)
  • #4832: Change the path pattern (*) to match the hidden file. (@koic)
  • Style/For now highlights the entire statement rather than just the keyword. (@rrosenblum)
  • Disable Performance/CaseWhenSplat and its auto-correction by default. (@rrosenblum)
  • #6235: Enable Layout/EmptyLineAfterGuardClause cop by default. (@koic)
  • #6199: Style/DateTime has been moved to disabled by default. (@deivid-rodriguez)

0.58.2

Changes

New features

  • #6105: Support {a,b} file name globs in Exclude and Include config. (@mikeyhew)

  • #6116: Add ip to allowed names of Naming/UncommunicativeMethodParamName cop in default config. (@nijikon)

Bug fixes

  • #6103: Fix a false positive for Layout/IndentationWidth when multiple modifiers are used in a block and a method call is made at end of the block. (@koic)
  • #6084: Fix Naming/MemoizedInstanceVariableName cop to allow methods to have leading underscores. (@kenman345)
  • #6098: Fix an error for Layout/ClassStructure when there is a comment in the macro method to be auto-correct. (@koic)
  • #6115: Fix a false positive for Lint/OrderedMagicComments when using { encoding: Encoding::SJIS } hash object after frozen_string_literal magic comment. (@koic)

0.58.1

Bug fixes

  • #6071: Fix auto-correct Style/MethodCallWithArgsParentheses when arguments are method calls. (@maxh)
  • Fix Style/RedundantParentheses with hash literal as first argument to super. (@maxh)
  • #6086: Fix an error for Gemspec/OrderedDependencies when using method call to gem names in gemspec. (@koic)
  • #6089: Make Rails/BulkChangeTable aware of variable table name. (@wata727)
  • #6088: Fix an error for Layout/MultilineAssignmentLayout cop when using multi-line block defines on separate lines. (@koic)
  • #6092: Don't use the broken parser 2.5.1.1 version. (@bbatsov)

0.57.2

Bug fixes

  • #5968: Prevent Layout/ClosingHeredocIndentation from raising an error on << heredocs. (@dvandersluis)
  • #5965: Prevent Layout/ClosingHeredocIndentation from raising an error on heredocs containing only a newline. (@drenmi)
  • Prevent a crash in Layout/IndentationConsistency cop triggered by an empty expression string interpolation. (@alexander-lazarov)
  • #5951: Prevent Style/MethodCallWithArgsParentheses from raising an error in certain cases. (@drenmi)

0.57.1

Bug fixes

  • #5963: Allow Performance/ReverseEach to apply to any receiver. (@dvandersluis)
  • #5917: Fix erroneous warning for inherit_mode directive. (@jonas054)
  • #5380: Fix false negative in Layout/IndentationWidth when an access modifier section has an invalid indentation body. (@tatsuyafw)
  • #5909: Even when a module has no public methods, Layout/IndentationConsistency should still register an offense for private methods. (@jaredbeck)
  • #5958: Handle empty method body in Rails/BulkChangeTable. (@wata727)
  • #5954: Make Style/UnneededCondition cop accepts a case of condition and if_branch are same when using elsif branch. (@koic)

0.57.0

New features

  • #5881: Add new Rails/BulkChangeTable cop. (@wata727)
  • #5444: Add new Style/AccessModifierDeclarations cop. (@brandonweiss)
  • #5803: Add new Style/UnneededCondition cop. (@balbesina)
  • #5406: Add new Layout/ClosingHeredocIndentation cop. (@siggymcfried)
  • #5823: Add new slashes style to Rails/FilePath since Ruby accepts forward slashes even on Windows. (@sunny)
  • New cop Layout/LeadingBlankLines checks for empty lines at the beginning of a file. (@rrosenblum)

Bug fixes

  • #5897: Fix Style/SymbolArray and Style/WordArray not working on arrays of size 1. (@TikiTDO)
  • #5894: Fix Rails/AssertNot to allow it to have failure message. (@koic)
  • #5888: Do not register an offense for headers or env keyword arguments in Rails/HttpPositionalArguments. (@rrosenblum)
  • Fix the indentation of autocorrected closing squiggly heredocs. (@garettarrowood)
  • #5908: Fix Style/BracesAroundHashParameters auto-correct going past the end of the file when the closing curly brace is on the last line of a file. (@EiNSTeiN-)
  • Fix a bug where Style/FrozenStringLiteralComment would be added to the second line if the first line is empty. (@rrosenblum)
  • #5914: Make Layout/SpaceInsideReferenceBrackets aware of no_space when using nested reference brackets. (@koic)
  • #5799: Fix false positive in Style/MixinGrouping when method named include accepts block. (@Darhazer)

Changes

Not all release notes shown. View the full release notes

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ rainbow (indirect, 2.2.2 → 3.0.0) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 51 commits:

🆕 jaro_winkler (added, 1.5.1)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Dec 11, 2018

@depfu depfu bot force-pushed the depfu/update/rubocop-0.61.1 branch from 6d1406b to 37bcd50 Dec 11, 2018

@depfu depfu bot changed the title from 🚨 [security] Upgrade rubocop: 0.48.1 → 0.61.1 (major) to 🚨 [security] Upgrade rubocop: 0.48.1 → 0.61.1 (major) Dec 11, 2018

@codecov-io

This comment has been minimized.

codecov-io commented Dec 11, 2018

Codecov Report

Merging #216 into master will decrease coverage by 57.95%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #216       +/-   ##
===========================================
- Coverage   92.49%   34.54%   -57.96%     
===========================================
  Files          35       22       -13     
  Lines         533      414      -119     
===========================================
- Hits          493      143      -350     
- Misses         40      271      +231
Impacted Files Coverage Δ
app/helpers/users_helper.rb 20% <0%> (-80%) ⬇️
test/controllers/sessions_controller_test.rb 22.72% <0%> (-77.28%) ⬇️
test/mailers/user_mailer_test.rb 28.57% <0%> (-71.43%) ⬇️
test/controllers/errors_controller_test.rb 28.57% <0%> (-71.43%) ⬇️
test/controllers/pages_controller_test.rb 28.57% <0%> (-71.43%) ⬇️
app/helpers/dashboards_helper.rb 27.39% <0%> (-68.5%) ⬇️
test/models/user_test.rb 33.33% <0%> (-66.67%) ⬇️
test/helpers/application_helper_test.rb 38.46% <0%> (-61.54%) ⬇️
test/helpers/collections_helper_test.rb 38.88% <0%> (-61.12%) ⬇️
app/helpers/application_helper.rb 40% <0%> (-60%) ⬇️
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 807f94a...37bcd50. Read the comment docs.

@depfu depfu bot force-pushed the depfu/update/rubocop-0.61.1 branch from 37bcd50 to 38594c1 Dec 11, 2018

@ruebot

This comment has been minimized.

Member

ruebot commented Dec 11, 2018

@​depfu rebase

@depfu depfu bot force-pushed the depfu/update/rubocop-0.61.1 branch from 38594c1 to 483fd51 Dec 11, 2018

@ruebot ruebot referenced this pull request Dec 11, 2018

Closed

Update RuboCop #221

@ruebot ruebot closed this in 6cbaf87 Dec 11, 2018

@depfu depfu bot deleted the depfu/update/rubocop-0.61.1 branch Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment