Rubocop v0.72.0 Release Notes

Release Date: 2019-06-25 // almost 5 years ago
  • ๐Ÿ†• New features

    • ๐Ÿ’Ž #7137: Add new Gemspec/RubyVersionGlobalsUsage cop. (@malyshkosergey)
    • ๐Ÿ’… #7150: Add AllowIfModifier option to Style/IfInsideElse cop. (@koic)
    • ๐Ÿ’… #7153: Add new cop Style/FloatDivision that checks coercion. (@tejasbubane)

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #7121: Fix Style/TernaryParentheses cop to allow safe navigation operator without parentheses. (@timon)
    • ๐Ÿ’… #7063: Fix autocorrect in Style/TernaryParentheses cop. (@parkerfinch)
    • ๐Ÿ‘• #7106: Fix an error for Lint/NumberConversion when #to_i called on a variable on a hash. (@koic)
    • ๐Ÿ’… #7107: Fix parentheses offence for numeric arguments with an operator in Style/MethodCallWithArgsParentheses. (@gsamokovarov)
    • #7119: Fix cache with non UTF-8 offense message. (@pocke)
    • ๐Ÿ’… #7118: Fix Style/WordArray with encoding: binary magic comment and non-ASCII string. (@pocke)
    • ๐Ÿ‘• #7159: Fix an error for Lint/DuplicatedKey when using endless range. (@koic)
    • ๐Ÿ’… #7151: Fix Style/WordArray to also consider words containing hyphens. (@fwitzke)
    • #6893: Handle implicit rescue correctly in Naming/RescuedExceptionsVariableName. (@pocke, @anthony-robin)
    • ๐Ÿ’… #7165: Fix an auto-correct error for Style/ConditionalAssignment when without else branch'. (@koic)
    • ๐Ÿ’… #7171: Fix an error for Style/SafeNavigation when using unless nil? as a safeguarded'. (@koic)
    • #7113: This PR renames EnforcedStyle: rails to EnabledStyle: outdented_access_modifiers for Layout/IndentationConsistency. (@koic)
    • ๐Ÿ’… #7130: Skip autocorrect in Style/FormatString if second argument to String#% is a variable. (@tejasbubane)
    • ๐Ÿ’… #7171: Fix an error for Style/SafeNavigation when using unless nil? as a safeguarded'. (@koic)

    ๐Ÿ”„ Changes

    • ๐Ÿšš #5976: Remove Rails cops. (@koic)
    • ๐Ÿšš #5976: Remove rubocop -R/--rails option. (@koic)
    • #7113: Rename EnforcedStyle: rails to EnabledStyle: indented_internal_methods for Layout/IndentationConsistency. (@koic)