Rubocop v0.51.0 Release Notes

Release Date: 2017-10-18 // over 6 years ago
  • ๐Ÿ†• New features

    • ๐Ÿš… #4791: Add new Rails/UnknownEnv cop. ([@pocke][])
    • ๐Ÿ‘• #4690: Add new Lint/UnneededRequireStatement cop. ([@koic][])
    • ๐Ÿ’… #4813: Add new Style/StderrPuts cop. ([@koic][])
    • ๐Ÿ‘• #4796: Add new Lint/RedundantWithObject cop. ([@koic][])
    • ๐Ÿ’… #4663: Add new Style/CommentedKeyword cop. ([@donjar][])
    • โž• Add IndentationWidth configuration for Layout/Tab cop. ([@rrosenblum][])
    • ๐Ÿ‘• #4854: Add new Lint/RegexpAsCondition cop. ([@pocke][])
    • #4862: Add MethodDefinitionMacros option to Naming/PredicateName cop. ([@koic][])
    • #4874: Add new Gemspec/OrderedDependencies cop. ([@sue445][])
    • ๐Ÿ’… #4840: Add new Style/MixinUsage cop. ([@koic][])
    • ๐Ÿ’… #1952: Add new Style/DateTime cop. ([@dpostorivo][])
    • ๐Ÿ‘• #4727: Make Lint/Void check for nonmutating methods as well. ([@donjar][])

    ๐Ÿ› Bug fixes

    • ๐Ÿš… #3312: Make Rails/Date Correct false positive on #to_time for strings ending in UTC-"Z".([@erikdstock][])
    • ๐Ÿ’… #4741: Make Style/SafeNavigation correctly exclude methods called without dot. ([@drenmi][])
    • ๐Ÿ‘• #4740: Make Lint/RescueWithoutErrorClass aware of modifier form rescue. ([@drenmi][])
    • ๐Ÿ’… #4745: Make Style/SafeNavigation ignore negated continuations. ([@drenmi][])
    • ๐ŸŽ #4732: Prevent Performance/HashEachMethods from registering an offense when #each follows #to_a. ([@drenmi][])
    • ๐Ÿ‘• #4730: False positive on Lint/InterpolationCheck. ([@koic][])
    • ๐Ÿš… #4751: Prevent Rails/HasManyOrHasOneDependent cop from registering offense if :through option was specified. ([@smakagon][])
    • #4737: Fix ReturnInVoidContext cop when return is in top scope. ([@frodsan][])
    • #4776: Non utf-8 magic encoding comments are now respected. ([@deivid-rodriguez][])
    • ๐Ÿš… #4241: Prevent Rails/Blank and Rails/Present from breaking when there is no explicit receiver. ([@rrosenblum][])
    • ๐Ÿš… #4814: Prevent Rails/Blank from breaking on send with an argument. ([@pocke][])
    • #4759: Make Naming/HeredocDelimiterNaming and Naming/HeredocDelimiterCase aware of more delimiter patterns. ([@drenmi][])
    • ๐Ÿ‘• #4823: Make Lint/UnusedMethodArgument and Lint/UnusedBlockArgument aware of overriding assignments. ([@akhramov][])
    • ๐Ÿ‘• #4830: Prevent Lint/BooleanSymbol from truncating symbol's value in the message when offense is located in the new syntax hash. ([@akhramov][])
    • ๐Ÿš… #4747: Fix Rails/HasManyOrHasOneDependent cop incorrectly flags with_options blocks. ([@koic][])
    • ๐Ÿš… #4836: Make Rails/OutputSafety aware of safe navigation operator. ([@drenmi][])
    • ๐Ÿ‘• #4843: Make Lint/ShadowedException cop aware of same system error code. ([@koic][])
    • ๐Ÿ’… #4757: Make Style/TrailingUnderscoreVariable work for nested assignments. ([@donjar][])
    • ๐Ÿ’… #4597: Fix Style/StringLiterals cop not registering an offense on single quoted strings containing an escaped single quote when configured to use double quotes. ([@promisedlandt][])
    • ๐Ÿ‘• #4850: Lint/UnusedMethodArgument respects IgnoreEmptyMethods setting by ignoring unused method arguments for singleton methods. ([@jmks][])
    • #2040: Document how to write a custom cop. ([@jonatas][])

    ๐Ÿ”„ Changes

    • ๐Ÿ‘• #4746: The Lint/InvalidCharacterLiteral cop has been removed since it was never being actually triggered. ([@deivid-rodriguez][])
    • ๐Ÿ‘ #4789: Analyzing code that needs to support MRI 1.9 is no longer supported. ([@deivid-rodriguez][])
    • ๐Ÿ”ง #4582: Severity and other common parameters can be configured on department level. ([@jonas054][])
    • ๐Ÿ‘ #4787: Analyzing code that needs to support MRI 2.0 is no longer supported. ([@deivid-rodriguez][])
    • #4787: RuboCop no longer installs on MRI 2.0. ([@deivid-rodriguez][])
    • #4266: Download the inherited config files of a remote file from the same remote. ([@tdeo][])
    • ๐Ÿ‘• #4853: Make Lint/LiteralInCondition cop aware of ! and not. ([@pocke][])
    • ๐Ÿ‘• #4864: Rename Lint/LiteralInCondition to Lint/LiteralAsCondition. ([@pocke][])