github rubocop/rubocop v0.59.0
RuboCop 0.59.0

latest releases: v1.63.3, v1.63.4, v1.63.2...
5 years ago

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)

Don't miss a new rubocop release

NewReleases is sending notifications on new releases.