Rubocop v0.43.0 Release Notes

Release Date: 2016-09-19 // over 7 years ago
  • ๐Ÿ†• New features

    • #3379: Add table of contents at the beginning of HTML formatted output. ([@hedgesky][])
    • ๐Ÿ“š #2968: Add new Style/DocumentationMethod cop. ([@sooyang][])
    • ๐Ÿ“š #3360: Add RequireForNonPublicMethods configuration option to Style/DocumentationMethod cop. ([@drenmi][])
    • โž• Add new Rails/SafeNavigation cop to convert try! to &.. ([@rrosenblum][])
    • ๐Ÿš… #3415: Add new Rails/NotNullColumn cop. ([@pocke][])
    • ๐Ÿ’… #3167: Add new Style/VariableNumber cop. ([@sooyang][])
    • Add new style no_mixed_keys to Style/HashSyntax to only check for hashes with mixed keys. ([@daviddavis][])
    • ๐Ÿ‘ Allow including multiple configuration files from a single gem. ([@tjwallace][])
    • โž• Add check for persisted? method call when using a create method in Rails/SaveBang. ([@QuinnHarris][])
    • โž• Add new Style/SafeNavigation cop to convert method calls safeguarded by a non nil check for the object to &.. ([@rrosenblum][])
    • โž• Add new Performance/SortWithBlock cop to use sort_by(&:foo) instead of sort { |a, b| a.foo <=> b.foo }. ([@koic][])
    • #3492: Add new UnifiedInteger cop. ([@pocke][])

    ๐Ÿ› Bug fixes

    • ๐Ÿ’… #3383: Fix the local variable reset issue with Style/RedundantSelf cop. ([@bankair][])
    • ๐Ÿ’… #3445: Fix bad auto-correct for Style/AndOr cop. ([@mikezter][])
    • ๐Ÿ’… #3349: Fix bad auto-correct for Style/Lambda cop. ([@metcalf][])
    • ๐ŸŽ #3351: Fix bad auto-correct for Performance/RedundantMatch cop. ([@annaswims][])
    • ๐Ÿ’… #3347: Prevent infinite loop in Style/TernaryParentheses cop when used together with Style/RedundantParentheses. ([@drenmi][])
    • ๐Ÿ’… #3209: Remove faulty line length check from Style/GuardClause cop. ([@drenmi][])
    • ๐Ÿ’… #3366: Make Style/MutableConstant cop aware of splat assignments. ([@drenmi][])
    • ๐Ÿ’… #3372: Fix RuboCop crash with empty brackets in Style/Next cop. ([@pocke][])
    • ๐Ÿ’… #3358: Make Style/MethodMissing cop aware of class scope. ([@drenmi][])
    • ๐Ÿ‘• #3342: Fix error in Lint/ShadowedException cop if last rescue does not have parameter. ([@soutaro][])
    • ๐Ÿ’… #3380: Fix false positive in Style/TrailingUnderscoreVariable cop. ([@drenmi][])
    • ๐Ÿ‘• #3388: Fix bug where Lint/ShadowedException would register an offense when rescuing different numbers of custom exceptions in multiple rescue groups. ([@rrosenblum][])
    • #3386: Make VariableForce understand an empty RegExp literal as LHS to =~. ([@drenmi][])
    • #3421: Fix clobbering inherit_from additions when not using Namespaces in the configs. ([@nicklamuro][])
    • ๐Ÿ‘• #3425: Fix bug for invalid bytes in UTF-8 in Lint/PercentStringArray cop. ([@pocke][])
    • ๐Ÿ”ง #3374: Make SpaceInsideBlockBraces and SpaceBeforeBlockBraces not depend on BlockDelimiters configuration. ([@jonas054][])
    • ๐Ÿ›  Fix error in Lint/ShadowedException cop for higher number of rescue groups. ([@groddeck][])
    • ๐Ÿ’… #3456: Don't crash on a multiline empty brace in Style/MultilineMethodCallBraceLayout. ([@pocke][])
    • ๐Ÿ“œ #3423: Checks if .rubocop is a file before parsing. ([@joejuzl][])
    • ๐Ÿš… #3439: Fix variable assignment check not working properly when a block is used in Rails/SaveBang. ([@QuinnHarris][])
    • ๐Ÿ’… #3401: Read file contents in binary mode so Style/EndOfLine works on Windows. ([@jonas054][])
    • ๐Ÿ’… #3450: Prevent Style/TernaryParentheses cop from making unsafe corrections. ([@drenmi][])
    • ๐Ÿ’… #3460: Fix false positives in Style/InlineComment cop. ([@drenmi][])
    • #3485: Make OneLineConditional cop not register offense for empty else. ([@tejasbubane][])
    • ๐Ÿš… #3508: Fix false negatives in Rails/NotNullColumn. ([@pocke][])
    • #3462: Don't create MultilineMethodCallBraceLayout offenses for single-line method calls when receiver spans multiple lines. ([@maxjacobson][])

    ๐Ÿ”„ Changes

    • ๐Ÿ’… #3341: Exclude RSpec tests from inspection by Style/NumericPredicate cop. ([@drenmi][])
    • ๐Ÿ‘• Rename Lint/UselessArraySplat to Lint/UnneededSplatExpansion, and add functionality to check for unnecessary expansion of other literals. ([@rrosenblum][])
    • ๐ŸŽ No longer register an offense for splat expansion of an array literal in Performance/CaseWhenSplat. Lint/UnneededSplatExpansion now handles this behavior. ([@rrosenblum][])
    • ๐Ÿ‘• Lint/InheritException restricts inheriting from standard library subclasses of Exception. ([@metcalf][])
    • ๐Ÿ’… No longer register an offense if the first line of code starts with #\ in Style/LeadingCommentSpace. config.ru files consider such lines as options. ([@scottohara][])
    • ๐ŸŽ #3292: Remove Performance/PushSplat as it can produce code that is slower or even cause failure. ([@jonas054][])