Recent Releases of https://github.com/rubocop/rubocop
https://github.com/rubocop/rubocop - RuboCop 1.40
New features
- #11179: Add
Style/RedundantConstantBasecop. (@r7kamura) - #11205: Add
--[no-]auto-gen-enforced-styleCLI option. (@ydah) - #11235: Add
Style/RequireOrdercop. (@r7kamura) - #11219: Make
Style/SelectByRegexpaware of!~method. (@koic) - #11224: Add new cop
Style/ArrayIntersectwhich replaces(array1 & array2).any?witharray1.intersect?(array2), methodArray#intersect?was added in ruby 3.1. (@KirIgor) - #11211: Add autocorrect for
Lint/AssignmentInCondition. (@r7kamura)
Bug fixes
- #5251: Fix loading of configuration in multi-file edge case. (@NobodysNightmare)
- #11192: Fix a false positive for
Lint/ParenthesesAsGroupedExpressionwhen using a block argument. (@ydah) - #11143: Fix RedundantCopDisableDirective errors when encountering several department comments. (@isarcasm)
- #11230: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen using safe navigation with[]operator followed by method chain. (@koic) - #11181: Fix pattern to match .tool-versions files that specify multiple runtimes. (@noelblaschke)
- #11239: Fix an incorrect autocorrect for
Style/GuardClausewhen using heredoc as an argument of raise in branch body. (@koic) - #11182: Fix an incorrect autocorrect for
EnforcedShorthandSyntax: alwaysofStyle/HashSyntaxwithStyle/IfUnlessModifierwhen using Ruby 3.1. (@koic) - #11184: Fix an error for
Lint/ShadowingOuterLocalVariablewhen a block local variable has same name as an outeruntilscope variable. (@koic) - #11198: Fix an error for
Lint/EmptyConditionalBodywhen one using line if/;/end without then boby. (@koic) - #11196: Fix a false positive for
Style/GuardClausewhen usingraiseinthenbody ofif..elsif..endform. (@koic) - #11213: Support redundant department disable in scope of
Lint/RedundantCopDisableDirectivecop. (@isarcasm) - #11200: Fix an incorrect autocorrect for
Layout/MultilineMethodCallBraceLayoutwhen using method chain for heredoc argument in multiline literal brace layout. (@koic) - #11190: Fix an error for
Style/IfWithSemicolonwhen using one line if/;/end without then boby. (@koic) - #11244: Fix a false negative for
Style/RedundantReturnwhen dynamic define methods. (@ydah)
Changes
- #11218: Update severity of
Bundler/DuplicatedGem,Bundler/InsecureProtocolSource,Gemspec/DeprecatedAttributeAssignment,Gemspec/DuplicatedAssignment,Gemspec/RequireMFA,Gemspec/RequiredRubyVersion, andGemspec/RubyVersionGlobalsUsagecops to warning. (@koic) - #11222: Make
Style/RedundantArgumentaware ofArray#sum. (@koic) - #11070: Add ability to count method calls as one line to code length related
Metriccops. (@fatkodima) - #11226: Make
Lint/Voidaware of used lambda and proc in void context. (@koic) - #11206: Change
Lint/InterpolationCheckfromSafe: falsetoSafeAutoCorrect: false. (@r7kamura) - #11212: Make
Lint/DeprecatedConstantsaware of deprecatedStruct::GroupandStruct::Passwdclasses. (@koic) - #11236: Remove
respond_tofrom default value ofAllowedMethodsforStyle/SymbolProc. (@koic) - #11185: Make
Style/HashSyntaxaware of without parentheses call expr follows. (@koic) - #11203: Support multiple arguments on
Lint/SendWithMixinArgument. (@r7kamura) - #11229: Add
cctoAllowedNamesofMethodParameterNamecop. (@tjschuck) - #11116: Handle ternaries in
Style/SafeNavigation. (@fatkodima)
- Ruby
Published by bbatsov about 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.39
New features
- #11091: Add autocorrect for
Layout/LineContinuationLeadingSpace. (@FnControlOption)
Bug fixes
- #11150: Improve
Style/RedundantRegexpEscapeto catch unnecessarily escaped hyphens within a character class. (@si-lens) - #11168: Fix an incorrect autocorrect for
Style/ClassEqualityComparisonwhen using instance variable comparison in module. (@koic) - #11176: Fix a false positive cases for
Lint/DuplicateMethodswhen using duplicate nested method. (@koic) - #11164: Suppress "RuboCop server starting..." message with
--server --format json. (@koic) - #11156: Fix
Style/OperatorMethodCallautocorrection when operators are chained. (@gsamokovarov) - #11139: Fix a false negative for
Style/HashEachMethodswhen using each with a symbol proc argument. (@ydah) - #11161: Fix a false positive for
Style/HashAsLastArrayItemwhen using double splat operator. (@koic) - #11151: Fix a false positive for
Lint/SuppressedException. (@akihikodaki) - #11123: Fix autocorrection bug for
Style/StringLiteralswhen using multiple escape characters. (@si-lens) - #11165: Fix a false positive for
Style/RedundantEachwhen any method is used between methods containingeachin the method name. (@koic) - #11177: Fix a false positive for
Style/ObjectThencop with TargetRubyVersion < 2.6. (@epaew) - #11173: Fix an incorrect autocorrect for
Style/CollectionCompactwhen usingrejectwith block pass arg and no parentheses. (@koic) - #11137: Fix a false positive for
Style/RedundantEachwhen using a symbol proc argument. (@ydah) - #11142: Fix
Style/RedundantEachfor non-chainedeach_calls. (@fatkodima)
Changes
- #11130: Check blank percent literal by
Layout/SpaceInsidePercentLiteralDelimiters. (@r7kamura) - #11163: Mark
Style/HashExceptas unsafe. (@r7kamura) - #11171: Support inline visibility definition on checking visibility. (@r7kamura)
- #11158: Add
ifto allowed names list for MethodParameterName. (@okuramasafumi)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.38
New features
- #11110: Add new
Style/RedundantEachcop. (@koic) - #10255: Add simple autocorrect for
Style/GuardClause. (@FnControlOption) - #11126: Have
Lint/RedundantRequireStatementmarksetas a redundant require in Ruby 3.2+. (@drenmi) - #11001: Add option to raise cop errors
--raise-cop-error. (@wildmaples) - #10987: Opt-in cop compatibility in redundant directives. (@tdeo)
Bug fixes
- #11125: Fix an error for
Layout/SpaceInsideHashLiteralBraceswhen using method argument that both key and value are hash literals. (@koic) - #11132: Fix clobbering error on
Lint/EmptyConditionalBody. (@r7kamura) - #11117: Fix a false positive for
Style/BlockDelimiterswhen specifyingEnforcedStyle: semanticand using a single line block with {} followed by a safe navigation method call. (@koic) - #11120: Fix an incorrect autocorrect for
Lint/RedundantRequireStatementwhen using redundantrequirewith modifier form. (@koic)
Changes
- #11131: Check newline in empty reference bracket on
Layout/SpaceInsideReferenceBrackets. (@r7kamura) - #11045: Update the
Style/ModuleFunctiondocumentation to suggestclass << selfas an alternative. (@rdeckard) - #11006: Allow multiple
elsifforStyle/IfWithBooleanLiteralBranches. (@koic) - #11113: Report the count of files in the Worst and the Offense Count formatters. (@hosamaly)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.37.1
Bug fixes
- #11102: Fix an error for
Style/AccessModifierDeclarationswhen using access modifier in a block. (@koic) - #11107: Fix a false positive for
Style/OperatorMethodCallwhen a constant receiver uses an operator method. (@koic) - #11104: Fix an error for
Style/CollectionCompactwhen usingrejectmethod and receiver is a variable. (@koic) - #11114: Fix an error for
Style/OperatorMethodCallwhen usingobj.!. (@koic) - #11088: Fix an error when specifying
SuggestExtensions: true. (@koic) - #11089: Fix an error for
Style/RedundantStringEscapewhen using character literals (e.g.?a). (@ydah) - #11098: Fix false positive for
Style/RedundantStringEscape. (@tdeo) - #11095: Fix an error for
Style/RedundantStringEscapecop when using?\nstring character literal. (@koic)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.37
New features
- #11043: Add new
Lint/DuplicateMagicCommentcop. (@koic) - #10409: Add
--no-exclude-limitCLI option. (@r7kamura) - #10986: Add autocorrect for
Style/StaticClass. (@FnControlOption) - #11018: Add
AllowedMethodsandAllowedPatternsforLint/NestedMethodDefinition. (@koic) - #11055: Implement
Lint/DuplicateMethodsfor object singleton class. (@tdeo) - #10997: Make
rubocopcommand aware of--serveroption from .rubocop and RUBOCOP_OPTS. (@koic) - #11079: Add new
Style/OperatorMethodCallcop. (@koic) - #10439: Add new
Style/RedundantStringEscapecop. (@owst)
Bug fixes
- #11034: Fix server mode behavior when using
--stderr. (@tdeo) - #11028: Fix a false positive for
Lint/RequireParentheseswhen using ternary operator in square bracksts. (@koic) - #11051: Preserve comments on
Style/AccessModifierDeclarationsautocorrection. (@r7kamura) - #9116: Support
supermethod inLayout/FirstArgumentIndentation. (@tdeo) - #11068: Fix a false positive for
Style/RedundantRegexpCharacterClasswhen using starting with "\0" number. (@koic) - #11082: Fix an incorrect autocorrect for
Lint/SafeNavigationChainwhen safe navigation on the right-hand side of the arithmetic operator. (@ydah) - #10982: Do not autocorrect parentheses for calls in assignments in conditional branches for
Style/MethodCallWithArgsParentheseswithomit_parentheses. (@gsamokovarov) - #11084: Fix an error for
Style/ParallelAssignmentwhen using parallel assignment in singleton method. (@koic) - #11078: Fix a false positive for
Style/RedundantBeginwhen using endless method definition forbeginwith multiple statements. (@koic) - #11074: Fix a false positive for
Lint/RedundantDirGlobSortwhen usingDir.globwith multiple arguments. (@koic) - #11025: Check comments for disables in
RedundantInitializecop. (@HeroProtagonist) - #11003: Fix clobbering exception in EmptyConditionalBody cop when if branch is empty but else is not. (@srcoley)
- #11026: Fix an error occurred for
Style/SymbolArrayandStyle/WordArraywhen empty percent array. (@ydah) - #11022: Fix an incorrect autocorrect for
Style/RedundantConditionwhen using redundant brackets access condition. (@koic) - #11037: Fix a false positive for
Style/CollectionCompactwhen usingto_enum.rejectorlazy.rejectmethods with Ruby 3.0 or lower. (@koic) - #11017: Fix an autocorrect for
Lint/EmptyConditionalBodythat causes a SyntaxError when missingifandelsebody. (@ydah) - #11047: Fix an incorrect autocorrect for
Style/SafeNavigationChainwhen using+@and-@methods. (@koic) - #11015: Fix a false positive for
Style/HashSyntaxwhen without parentheses call expr follows after nested method call. (@koic) - #11067: Fix a false positive for
Lint/DuplicateRegexpCharacterClassElementwhen using regexp character starts with escaped zero number. (@koic) - #11030: Fix an incorrect autocorrect for
Lint/UnusedMethodArgumentandStyle::ExplicitBlockArgumentwhen autocorrection conflicts for&blockargument. (@koic) - #11069: Fix an incorrect autocorrect for
Lint/RedundantCopDisableDirectivewhen disable directive contains free comment. (@koic) - #11063: Preserve comments on
Style/AccessorGroupingautocorrection. (@r7kamura) - #10994: Fix an error when running 3rd party gem that does not require server. (@koic)
Changes
- #11054: Implement correct behavior for compact mode for
Layout/SpaceInsideArrayLiteralBrackets. (@tdeo) - #10924:
Style/NegatedIfElseConditionalso checks negative conditions inside parentheses. (@tsugimoto) - #11042: Mark
Lint/OrderedMagicCommentsas unsafe autocorrection. (@koic) - #11057: Make
Lint/RedundantRequireStatementaware ofpp,ruby2_keywords, andfiber. (@koic) - #10988: Raise error when both safe and unsafe autocorrect options are specified. (@koic)
- #11032: Detect empty Hash literal braces containing only newlines and spaces on
Layout/SpaceInsideHashLiteralBraces. (@r7kamura)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.36
New features
- #10931: Add
AllowOnSelfClassoption toStyle/CaseEquality. (@sambostock)
Bug fixes
- #10958: Fix an infinite loop for
Layout/SpaceInsideBlockBraceswhenEnforcedStyleisno_spaceand using multiline block. (@ydah) - #10903: Skip forking off extra processes for parallel inspection when only a single file needs to be inspected. (@wjwh)
- #10919: Fix a huge performance regression between 1.32.0 and 1.33.0. (@ydah)
- #10951: Fix an autocorrection error for
Lint/EmptyConditionalBodywhen some conditional branch is empty. (@ydah) - #10927: Fix a false positive for
Style/HashTransformKeysandStyle/HashTransformValueswhen not using transformed block argument. (@koic) - #10979: Fix a false positive for
Style/RedundantParentheseswhen using parentheses with pin operator except for variables. (@Tietew) - #10962: Fix a false positive for
Lint/ShadowingOuterLocalVariablewhen conditional with if/elsif/else branches. (@ydah) - #10969: Fix a false negative for
AllowedPatternsofLint/AmbiguousBlockAssociationwhen using a method chain. (@jcalvert) - #10963: Fix a false positive for
Layout/IndentationWidthwhen using aligned emptyelsein pattern matching. (@koic) - #10975: Fix possible wrong autocorrection in namespace on
Style/PerlBackrefs. (@r7kamura)
Changes
- #10928: Add more autocorrect support on
Style/EachForSimpleLoop. (@r7kamura) - #10960: Add
astoAllowedNamesin default configuration forNaming/MethodParameterNamecop. (@koic) - #10966: Add autocorrect support to
Style/AccessModifierDeclarations. (@r7kamura) - #10940: Add server mode status to
-Voption. (@koic)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.35.1
Bug fixes
- #10926: Make
Style/SafeNavigationaware of a redundant nil check. (@koic) - #10944: Fix an incorrect autocorrect for
Lint/LiteralInInterpolationwhen using"#{nil}". (@koic) - #10921: Fix an error when ERB pre-processing of the configuration file. (@koic)
- #10936: Fix an error for
Lint/NonAtomicFileOperationwhen usingFileTest.exist?as a condition forelsif. (@koic) - #10920: Fix an incorrect autocorrect for
Style/SoleNestedConditionalwhen using nested conditional and branch contains a comment. (@koic) - #10939: Fix an error for
Style/Nextwhen line break before condition. (@koic)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.35
New features
- #9364: Add
Style/MagicCommentFormatcop. (@dvandersluis, @mattbearman) - #10776: New option (
consistent) forEnforcedShorthandSyntaxinStyle/HashSyntaxto avoid mixing shorthand and non-shorthand hash keys in ruby 3.1. (@h-lame)
Bug fixes
- #10899: Fix an error for
Lint/ShadowingOuterLocalVariablewhen the same variable name as a block variable is used in return value assignment ofif. (@koic) - #10916: Fix an error when .rubocop.yml is empty. (@koic)
- #10915: Fix numblock support to
Layout/BlockAlignment,Layout/BlockEndNewline,Layout/EmptyLinesAroundAccessModifier,Layout/EmptyLinesAroundBlockBody,Layout/IndentationWidth,Layout/LineLength,Layout/MultilineBlockLayout,Layout/SpaceBeforeBlockBraces,Lint/NextWithoutAccumulator,Lint/NonDeterministicRequireOrder,Lint/RedundantWithIndex,Lint/RedundantWithObject,Lint/UnreachableLoop,Lint/UselessAccessModifier,Lint/Void,Metrics/AbcSize,Metrics/CyclomaticComplexity,Style/CollectionMethods,Style/CombinableLoops,Style/EachWithObject,Style/For,Style/HashEachMethods,Style/InverseMethods,Style/MethodCalledOnDoEndBlock,Style/MultilineBlockChain,Style/Next,Style/ObjectThen,Style/Proc,Style/RedundantBegin,Style/RedundantSelf,Style/RedundantSortByandStyle/TopLevelMethodDefinition. (@gsamokovarov) - #10895: Fix incorrect autocomplete in
Style/RedundantParentheseswhen a heredoc is used in an array. (@dvandersluis) - #10909: Fix loading behavior on running without
bundle exec. (@r7kamura) - #10913: Make
Style/ArgumentsForwardingaware of anonymous block argument. (@koic) - #10911: Fix Style/ClassMethodsDefinitions for non-self receivers. (@sambostock)
Changes
- #10915: Depend on rubocop-ast 1.20.1 for numblocks support in #macro?. (@gsamokovarov)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.34.1
Bug fixes
- Ruby
Published by koic over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.34
New features
- #10170: Add new
InternalAffairs/SingleLineComparisoncop. (@dvandersluis)
Bug fixes
- #10552: Require RuboCop AST 1.20.0+ to fix a false positive for
Lint/OutOfRangeRegexpRefwhen using fixed-encoding regopt. (@koic) - #10512: Fix a false positive for
Lint/ShadowingOuterLocalVariableconditional statement and block variable. (@ydah) - #10864:
minandmaxresults in false positives forStyle/SymbolProcsimilarly toselectandreject. (@mollerhoj) - #10846: Fix a false negative for
Style/DoubleNegationwhen there is a hash or an array at return location of method. (@nobuyo) - #10875: Fix an obsolete option configuration values are duplicated when generating
.rubocop_todo.yml. (@ydah) - #10877: Fix crash with
Layout/BlockEndNewlineheredoc detection. (@dvandersluis) - #10859: Fix
Lint/Debuggerto be able to handle method chains correctly. (@dvandersluis) - #10883: Fix
Style/RedundantParenthesesto be able to detect offenses and properly correct when the end parentheses and comma are on their own line. (@dvandersluis) - #10881: Fix
Style/SoleNestedConditionalto properly wrapblockandcsendnodes when necessary. (@dvandersluis) - #10867: Mark autocorrection for
Lint/EmptyConditionalBodyas unsafe. (@dvandersluis) - #10871: Restore
RuboCop::ConfigLoader.project_rootas deprecated. (@koic)
Changes
- #10857: Add
AllowedPatternstoStyle/NumericLiterals. (@dvandersluis) - #10648: Allow
Style/TernaryParenthesesto take priority overStyle/RedundantParentheseswhen parentheses are enforced. (@dvandersluis) - #10731: Show tip for suggested extensions that are installed but not loaded in .rubocop.yml. (@nobuyo)
- #10845: Support Bundler-like namespaced feature on require config. (@r7kamura)
- #10773: Require Parser 3.1.2.1 or higher. (@dvandersluis)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.33
Bug fixes
- #10830: Fix an incorrect autocorrect for
Layout/FirstArgumentIndentationwhen specifyingEnforcedStyle: with_fixed_indentationofLayout/ArgumentAlignmentandEnforcedStyle: consistentofLayout/FirstArgumentIndentationand enablingLayout/FirstMethodArgumentLineBreak. (@koic) - #10825: Fix an incorrect autocorrect for
Style/ClassAndModuleChildrenwhen using nested one-liner class. (@koic) - #10843: Fix a false positive for
Style/HashExceptwhen usingrejectand callinginclude?method with symbol array and second block value. (@koic) - #10853: Fix an autocorrect for
Style/RedundantSortwith logical operator. (@ydah) - #10842: Make server mode aware of
CacheRootDirectoryconfig option value,RUBOCOP_CACHE_ROOT, andXDG_CACHE_HOMEenvironment variables. (@koic) - #10833: Fix an incorrect autocorrect for
Style/RedundantConditionwhen branches contains arithmetic operation. (@koic) - #10864: Fix a false positive for
Style/SymbolProcwhen usingHash#reject. (@koic) - #10771: Make server mode aware of
--cache-rootcommand line option. (@koic) - #10831: Fix an error when using
changed_parametersin obsoletion.yml by external library. (@koic) - #10850: Fix
Style/ClassEqualityComparisonautocorrection within module. (@r7kamura) - #10832: Fix an incorrect autocorrect for
Layout/BlockEndNewlinewhen multiline block}is not on its own line and using heredoc argument. (@koic)
Changes
- #10841: Don't hash shared libraries for cache key. (@ChrisBr)
- #10862: Add autocorrection to
Lint/EmptyConditionalBody. (@dvandersluis) - #10829: Deprecate
IgnoredMethodsoption in favor of theAllowedMethodsandAllowedPatternsoptions. (@ydah)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.32
New features
- #10820: Add new
Style/EmptyHeredoccop. (@koic) - #10691: Add new
Layout/MultilineMethodParameterLineBreakscop. (@Korri) - #10790: Support
AllowCommentsoption forStyle/EmptyElse. (@ydah) - #10792: Add new
Lint/RequireRangeParenthesescop. (@koic) - #10692: Break long method definitions when auto-correcting. (@Korri)
Bug fixes
- #10824: Make
Lint/DeprecatedClassMethodsaware ofENV.cloneandENV.dup. (@koic) - #10788: Relax
Style/FetchEnvVarto allowENV[]in LHS of||. (@j-miyake) - #10813: Fix recursive deletion to suppression in
Lint/NonAtomicFileOperation. (@ydah) - #10791: Fix an incorrect autocorrect for
Style/Semicolonwhen using endless range before semicolon. (@koic) - #10781: Fix a suggestions for safer conversions for
Lint/NonAtomicFileOperation. (@ydah) - #10263: Fix the value of
Enabledleaking between configurations. (@jonas054)
Changes
- #10613: Allow autocorrecting with -P/--parallel and make it the default. (@jonas054)
- Add EnforcedStyle (leading/trailing) configuration to
Layout::LineContinuationLeadingSpace. (@bquorning) - #10784: Preserve multiline semantics on
Style/SymbolArrayandStyle/WordArray. (@r7kamura) - #10814: Avoid buffering stdout when running in server mode. (@ccutrer)
- #10817: Add autocorrect support for
Style/SafeNavigationChain. (@r7kamura) - #10810: Support safe navigation operator on
Style/SymbolProc. (@r7kamura) - #10803: Require RuboCop AST 1.9.1 or higher. (@koic)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.31.2
Bug fixes
- #10774: Fix false negatives in
Style/DocumentationMethodwhen a public method is defined after a private one. (@Darhazer) - #10764: Fix performance issue for Layout/FirstHashElementIndentation and Layout/FirstArrayElementIndentation. (@j-miyake)
- #10780: Fix an error when using
rubocop:auto_correctdeprecated custom rake task. (@koic) - #10786: Fix a false positive for
Lint/NonAtomicFileOperationwhen using complex conditional. (@koic) - #10785: Fix a false negative for
Style/RedundantParentheseswhen parens around a receiver of a method call with an argument. (@koic) - #10026: Fix merging of array parameters in either parent of default config. (@jonas054)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.31.1
Bug fixes
- #10763: Fix a false positive for
Layout/LineContinuationSpacingwhen using continuation keyword\after__END__. (@koic) - #10755: Fix a false positive for
Lint/LiteralAsConditionwhen using a literal incase-incondition where the match variable is used ininare accepted as a pattern matching. (@koic) - #10760: Fix a false positive for
Lint/NonAtomicFileOperationwhen usingFileTest.exist?withifcondition that haselsebranch. (@koic) - #10745: Require JSON 2.3 or higher to fix an incompatible JSON API error. (@koic)
- #10754: Fix an incorrect autocorrect for
Style/HashExceptwhen using a non-literal collection receiver forinclude?. (@koic) - #10751: Fix autocorrect for Layout/FirstHashElementIndentation. (@j-miyake)
- #10750: Recover 7x slow running
rubocop. (@koic)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.31
New features
- #10699: Add new global
ActiveSupportExtensionsEnabledoption. (@nobuyo) - #10245: Add specification_version and rubygems_version to
Gemspec/DeprecatedAttributeAssignment. (@kaitielth) - #10696: Add new
Lint/NonAtomicFileOperationcop. (@ydah) - #6420: Add new
Layout/LineContinuationLeadingSpacecop. (@bquorning) - #6420: Add new
Layout/LineContinuationSpacingcop. (@bquorning) - #10706: Integrate rubocop-daemon to add server options. (@koic)
- #10722: Add new
Lint/ConstantOverwrittenInRescuecop. (@ydah)
Bug fixes
- #10700: Update
Style/EmptyMethodto not correct if the correction would exceed the configuration forLayout/LineLength. (@dvandersluis) - #10698: Enhance
Style/HashExceptto support array inclusion checks. (@nobuyo) - #10734: Handle
ClobberingErrorinStyle/NestedTernaryOperatorwhen there are multiple nested ternaries. (@dvandersluis) - #10689: Fix autocorrect for
Layout/FirstHashElementIndentationandLayout/FirstArrayElementIndentation. (@j-miyake) - Fix
rubocop -Vnot displaying the version information for rubocop-graphql, rubocop-md and rubocop-thread_safety. (@Darhazer) - #10711: Fix an error for
Style/MultilineTernaryOperatorwhen the false branch is on a separate line. (@koic) - #10719: Fix a false positive for
Lint/ParenthesesAsGroupedExpressionwhen using safe navigation operator. (@koic) - #10736: Fix Layout/SpaceInsideBlockBraces for blocks with numbered arguments. (@gsamokovarov)
- #10749: Fix Style/BlockDelimiters for blocks with numbered arguments. (@gsamokovarov)
- #10737: Fix crash in
Style/ConditionalAssignmentwithEnforcedStyle: assign_inside_conditionwhen op-assigning a variable inside aresbody. (@dvandersluis) - #7900: Fix
Style/FormatStringTokenfalse positive with formatted input andtemplatestyle enforced, and add autocorrection. (@FnControlOption)
Changes
- #10730: Change output timing of GitHubActionsFormatter. (@r7kamura)
- #10709: Deprecate
rubocop:auto_correctcustom rake task and newly splitrubocop:autocorrectandrubocop:autocorrect-allcustom rake tasks. (@koic) - #9760: Change RangeHelp#range_with_surrounding_space to allow passing the range as a positional argument. (@pirj)
- #10693: Add ignore case for
Style/EmptyLinesAroundAttributeAccessorwhen there is a comment line on the next line. (@ydah) - #10245: (Breaking) integrate
Gemspec/DateAssignmentintoGemspec/DeprecatedAttributeAssignment. (@kaitielth) - #10697: Restore
Lint/UselessElseWithoutRescuecop. (@koic) - #10740: Make
Style/GuardClausea bit more lenient when the replacement would make the code more verbose. (@dvandersluis)
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.30.1
Bug fixes
- #10685: Fix a false positive for
Style/StringConcatenationwhenMode: conservativeand first operand is not string literal. (@koic) - #10670: Fix a false positive for
Style/FetchEnvVarin the body with assignment method. (@ydah) - #10671: Fix an incorrect autocorrect for
EnforcedStyle: with_first_argumentofLayout/ArgumentAlignmentandEnforcedColonStyle: separatorofLayout/HashAlignment. (@koic) - #10676: Fix
--ignore-unrecognized-copsoption always showing empty warning even if there was no problem. (@nobuyo) - #10674: Fix a false positive for
Naming/AccessorMethodNamewith type of the first argument is other thanarg. (@ydah) - #10679: Fix a false positive for
Style/SafeNavigationwhenTargetRubyVersion: 2.2or lower. (@koic)
Changes
- Ruby
Published by bbatsov over 3 years ago
https://github.com/rubocop/rubocop - RuboCop 1.30
New features
- #10065: Add new
Gemspec/DeprecatedAttributeAssignmentcop. (@koic) - #10608: Add new
Style/MapCompactWithConditionalBlockcop. (@nobuyo) - #10627: Add command-line option
--ignore-unrecognized-copsto ignore any unknown cops or departments in .rubocop.yml. (@nobuyo) - #10620: Add Sorbet's
typedsigil as a magic comment. (@zachahn)
Bug fixes
- #10662: Recover Ruby 2.1 code analysis using
TargetRubyVersion: 2.1. (@koic) - #10396: Fix autocorrect for
Layout/IndentationWidthto leave module/class body unchanged to avoid infinite autocorrect loop withLayout/IndentationConsistencywhen body trails after class/module definition. (@johnny-miyake) - #10636: Fix false positive in
Style/RedundantConditionwhen the branches call the same method on different receivers. (@dvandersluis) - #10651: Fix autocorrect for
Style/Forwhen using array with operator methods as collection. (@nobuyo) - #10629: Fix default Ruby version from 2.5 to 2.6. (@koic)
- #10661: Fix a false negative for
Style/SymbolProcwhen method has no arguments andAllowMethodsWithArguments: true. (@koic) - #10631: Fix autocorrect for
Style/RedundantBegin. (@johnny-miyake) - #10652: Fix a false positive for
Style/FetchEnvVarin conditions. (@ydah) - #10665: Fix an incorrect autocorrect for
EnforcedStyle: with_first_argumentofLayout/ArgumentAlignmentandEnforcedColonStyle: separatorofLayout/HashAlignment. (@koic) - #10258: Recover Ruby 2.4 code analysis using
TargetRubyVersion: 2.4. (@koic) - #10668: Recover Ruby 2.0 code analysis using
TargetRubyVersion: 2.0. (@koic) - #10644: Recover Ruby 2.2 code analysis using
TargetRubyVersion: 2.2. (@koic) - #10639: Fix
Style/HashSyntaxto exclude files that violate it withEnforceHashShorthandSyntaxwhen runningauto-gen-config. (@nobuyo) - #10633: Fix infinite autocorrection loop in
Style/AccessorGroupingwhen combining multiple of the same accessor. (@dvandersluis) - #10618: Fix
LineBreakCorrectorso that it won't remove a semicolon in the class/module body. (@johnny-miyake) - #10646: Fix an incorrect autocorrect for
Style/SoleNestedConditionalwhen usingunlessand&&without parens in the outer condition and nested modifier condition. (@koic) - #10659: Fix automatically appended path for
inherit_frombyauto-gen-configis incorrect if specified config file in a subdirectory as an option. (@nobuyo) - #10640: Recover Ruby 2.3 code analysis using
TargetRubyVersion: 2.3. (@koic) - #10657: Fix
--auto-gen-configcommand option ignores specified config file by option. (@nobuyo)
Changes
- #10095: Change "auto-correct" to "autocorrect" in arguments, documentation, messages, comments, and specs. (@chris-hewitt)
- #10656: Mark
Style/RedundantInterpolationas unsafe autocorrection. (@koic) - #10616: Markdown formatter: skip files with no offenses. (@rickselby)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.29.1
Bug fixes
- #10625: Restore the specification to
TargetRubyVersion: 2.5. (@koic) - #10569: Fix a false positive for
Style/FetchEnvVarwhen using the sameENVvar asifcondition in the body. (@koic) - #10614: Make
Lint/NonDeterministicRequireOrderaware ofrequire_relative. (@koic) - #10607: Fix autocorrect for
Style/RedundantConditionwhen there are parenthesized method calls in each branch. (@nobuyo) - #10622: Fix a false positive for
Style/RaiseArgswhen error type class constructor with keyword arguments and message argument. (@koic) - #10610: Fix an error for
Naming/InclusiveLanguagestring with invalid byte sequence in UTF-8. (@ydah) - #10605: Fix autocorrect for
Style/RedundantConditionif argument for method in else branch is hash without braces. (@nobuyo)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.29
New features
- #10570: Add new
Gemspec/DependencyVersioncop. (@nobuyo) - #10542: Add markdown formatter. (@joe-sharp)
- #10539: Add
AllowedPatternsconfiguration option toNaming/VariableNumberandNaming/VariableName. (@henrahmagix) - #10568: Add new
Style/EnvHomecop. (@koic)
Bug fixes
- #10586: Fix a false positive for
Style/DoubleNegationwhen usingdefine_methodordefine_singleton_method. (@ydah) - #10579: Fix a false positive for
Style/FetchEnvVarwhen calling a method with safe navigation. (@koic) - #10581: Fix a false positive for
Style/FetchEnvVarwhen comparing withENV['TERM']. (@koic) - #10589: Fix autocorrect for
Style/RaiseArgswithEnforcedStyle: compactand exception object is assigned to a local variable. (@nobuyo) - #10325: Enhance
Style/RedundantConditionby considering the case that variable assignments in each branch. (@nobuyo) - #10592: Fix infinite loop on
Style/MultilineTernaryOperatorif using assignment method and condition/branch is multiline. (@nobuyo) - #10536: Fix validation for command-line options combination of
--display-only-fail-level-offensesand--auto-correct. (@nobuyo)
Changes
- #10577: (Compatibility) Drop support for Ruby 2.5 and JRuby 9.2 (CRuby 2.5 compatible). (@koic)
- #10585: Enhance the autocorrect for
Style/FetchEnvVar. (@johnny-miyake) - #10577: (Breaking) Retire
Lint/UselessElseWithoutRescuecop. (@koic)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.28.2
Bug fixes
- #10566: Fix a false positive for
Lint/AmbiguousBlockAssociationwhen using proc is used as a last argument. (@koic) - #10573: Fix a false positive for
Layout/SpaceBeforeBracketswhen there is a dot before brackets. (@nobuyo) - #10563: Fix
Style/BlockDelimitersunexpectedly deletes block on moving comment if methods with block are chained. (@nobuyo) - #10574: Fix a false positive for
Style/SingleArgumentDigwhen using dig with arguments forwarding. (@ydah) - #10565: Fix a false positive and a true negative for
Style/FetchEnvVar. (@koic)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.28 (a.k.a. The 10th Anniversary Edition)
New features
- #10551: Add
AllowCommentsoption toStyle/RedundantInitializeis true by default. (@koic) - #10552: Support autocorrection for
Style/RedundantInitialize. (@koic) - #10441: Add Security/CompoundHash Cop. (@sambostock, @chrisseaton)
- #10521: Add
use_builtin_english_namesstyle toStyle/SpecialGlobalVars. (@splattael) - #10522: Add new
Style/ObjectThencop. (@ydah) - #10502: Add new
Style/FetchEnvVarcop. (@johnny-miyake) - #10544: Support auto-correction for
Lint/DuplicateRequire. (@koic) - #10481: Add command line options
--display-only-correctableand--display-only-safe-correctable. (@nobuyo)
Bug fixes
- #10528: Fix an infinite loop at autocorrect for
Layout/CaseIndentation. (@ydah) - #10537: Fix an incorrect auto-correct for
Style/MultilineTernaryOperatorwhen returning a multiline ternary operator expression withbreak,next, or method call. (@koic) - #10529: Fix autocorrect for
Style/SoleNestedConditionalcauses logical error when using a outer condition of method call by omitting parentheses for method arguments. (@nobuyo) - #10530: Fix a false positive for
Style/RedundantRegexpCharacterClasswhen using regexp character class with a character class containing multiple unicode code-points. (@koic) - #10518: Fix a false positive for
Style/DoubleNegationwhen inside returned conditional clauses with Ruby 2.7's pattern matching. (@koic) - #10510: Fix an error for
Style/SingleArgumentDigwhen using multipledigin a method chain. (@koic) - #10553: Fix crash with trailing tabs in heredocs for
Layout/TrailingWhitespace. (@dvandersluis) - #10488: Fix autocorrection for
Layout/MultilineMethodCallIndentationbreaks indentation for nesting of method calls. (@nobuyo) - #10543: Fix incorrect code length calculation for few more patterns of hash folding asked. (@nobuyo)
- #10541: Fix an incorrect autocorrect for
Style/SpecialGlobalVarswhen global variable as Perl name is used multiple times. (@koic) - #10514: Fix an error for
Lint/EmptyConditionalBodywhen missing secondelsifbody. (@koic) - #10469: Fix code length calculation when kwargs written in single line. (@nobuyo)
Changes
- #10555: Deprecate
IgnoredPatternsin favour ofAllowedPatterns. (@dvandersluis) - #10356: Add
AllowConsecutiveConditionalsoption toStyle/GuardClauseand the option is false by default. (@ydah) - #10524: Mark
Style/RedundantInitializeas unsafe. (@koic) - #10280: Add
AllowCommentsoption toStyle/SymbolProcand the option is false by default. (@ydah)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.27
New features
- #10500: Add new
Lint/RefinementImportMethodscop. (@koic) - #10438: Add new
Style/RedundantInitializecop to check for unnecessaryinitializemethods. (@dvandersluis)
Bug fixes
- #10464: Fix an incorrect autocorrect for
Lint/IncompatibleIoSelectWithFiberSchedulerwhen usingIO.selectwith read (or write) argument and using return value. (@koic) - #10506: Fix an error for
Style/RaiseArgswhenraisewithnewmethod without receiver. (@koic) - #10479: Fix a false positive for
Lint/ShadowingOuterLocalVariableconditional statement and block variable. (@ydah) - #10189: Fix
--display-style-guideso it works together with--format offenses. (@jonas054) - #10465: Fix false positive for
Naming/BlockForwardingwhen the block argument is assigned. (@dvandersluis) - #10491: Improve the handling of comments in
Lint/EmptyConditionalBody,Lint/EmptyInPatternandLint/EmptyWhenwhenAllowCommentsis set totrue. (@Darhazer) - #10504: Fix a false positive for
Lint/UnusedMethodArgumentwhen usingraise NotImplementedErrorwith optional arguments. (@koic) - #10494: Fix a false positive for
Style/HashSyntaxwhenreturnwith one lineifcondition follows (without parentheses). (@koic) - #10311: Fix false negative inside
do..endforLayout/RedundantLineBreak. (@jonas054) - #10468: Fix a false positive for
Style/FileWritewhen a splat argument is passed tof.write. (@koic) - #10474: Fix a false positive for
Style/DoubleNegationwithEnforcedStyle: allowed_in_returnswhen inside returned conditional clauses. (@ydah) - #10388: Fix an incorrectly adds a disable statement for
Layout/SpaceInsideArrayLiteralBracketswith--disable-uncorrectable. (@ydah) - #10489: Fix a false positive for
Lint/LambdaWithoutLiteralBlockwhen using lambda with a symbol proc. (@koic)
Changes
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.26.1
Bug fixes
- #10375: Fix error for auto-correction of
unless/elsenested inside each other. (@jonas054) - #10457: Make
Style/SelectByRegexpaware ofENVconst. (@koic) - #10462: Fix an incorrect autocorrect for
Lint/SymbolConversionwhen using a quoted symbol key with hash rocket. (@koic) - #10456: Fix a false positive for
Layout/MultilineMethodCallIndentationwhen usingEnforcedStyle: indentedwith indented assignment method. (@koic) - #10459: Fix a false positive for
Layout/LineLengthwhen long URIs in yardoc comments to have titles. (@ydah) - #10447: Fix an error for
Style/SoleNestedConditionalraises exception when inspectingif ... end if .... (@ydah)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.26
New features
- #10419: Add new
Style/NestedFileDirnamecop. (@koic) - #10433: Support
TargetRubyVersion 3.2(experimental). (@koic)
Bug fixes
- #10406: Fix a false positive for
Lint/InheritExceptionwhen inheriting a standard lib exception class that is not a subclass ofStandardError. (@koic) - #10421: Make
Style/DefWithParenthesesaware of endless method definition. (@koic) - #10401: Fix a false positive for
Style/HashSyntaxwhen local variable hash key and hash value are the same. (@koic) - #10424: Fix a false positive for
Security/YamlLoadwhen using Ruby 3.1+ (Psych 4). (@koic) - #10446: Lint/RedundantDirGlobSort unset SafeAutoCorrect. (@friendlyantz)
- #10403: Fix an error for
Style/StringConcatenationwhen string concatenation with multiline heredoc text. (@koic) - #10432: Fix an error when using regexp with non-encoding option. (@koic)
- #10415: Fix an error for
Lint/UselessTimeswhen using1.timeswith method chain. (@koic)
Changes
- #10408: Mark
Lint/InheritExceptionas unsafe auto-correction. (@koic) - #10407: Change
EnforcedStylefromruntime_errortostandard_errorforLint/InheritException. (@koic) - #10414: Update auto-gen-config's auto-correction comments to be more clear. (@maxjacobson)
- #10427: Mark
Style/Foras unsafe auto-correction. (@issyl0) - #10410: Improve help string for
--fail-levelCLI option. (@tejasbubane)
- Ruby
Published by bbatsov almost 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.25.1
Bug fixes
- #10359: Fix a false positive and negative for
Style/HashSyntaxwhen using hash value omission. (@koic) - #10387: Fix an error for
Style/RedundantBeginwhen assigning nestedbeginblocks. (@koic) - #10366: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen settingEnforcedStyle: omit_parenthesesand using hash value omission with modifier from. (@koic) - #10376: Fix an error for
Layout/RescueEnsureAlignmentwhen using.()call with block. (@koic) - #10364: Fix an infinite loop error for
Layout/HashAlignmentwhenEnforcedStyle: with_fixed_indentationis specified forLayout/ArgumentAlignment. (@koic) - #10371: Fix a false negative for
Style/HashSyntaxwhenHash[foo: foo]or{foo: foo}is followed by a next expression. (@koic) - #10394: Fix an error for
Style/SwapValueswhen assigning receiver object atdef. (@koic) - #10379: Fix an error for
Layout/EmptyLinesAroundExceptionHandlingKeywordswhenrescueandendare on the same line. (@koic)
- Ruby
Published by bbatsov about 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.25
New features
- #10351: Support
EnforcedShorthandSyntax: eitheroption forStyle/HashSyntax. (@koic) - #10339: Support auto-correction for
EnforcedStyle: explicitofNaming/BlockForwarding. (@koic)
Bug fixes
- #10344: Fix a false positive for
Style/CollectionCompactwhen without receiver for bad methods. (@koic) - #10353: Use
:ambiguous_regexpto detect ambiguous Regexp in Ruby 3. (@danieldiekmeier, @joergschiller) - #10336: Fix a false positive for
Style/TernaryParentheseswhen usinginkeyword pattern matching as a ternary condition. (@koic) - #10317: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen using hash value omission. (@koic) - #8032: Improve ArgumentAlignment detection and correction for keyword arguments. (@mvz)
- #10331: Fix cop generator for nested departments. (@fatkodima)
- #10357: Fix a false positive for
Style/HashSyntaxwhen omitting the value. (@berkos) - #10335: Fix a false positive for
Naming/BlockForwardingwhen using multiple proc arguments. (@koic) - #10350: Fix a false negative for
Lint/IncompatibleIoSelectWithFiberSchedulerwhen usingIO.selectwith the first argument only. (@koic) - #10358: Fix Style/Sample crash on beginless and endless range shuffle indexes. (@gsamokovarov)
- #10354: Fix Gemspec/RequiredRubyVersion version matcher when Gem::Requirement.new is used and initialised with multiple requirements. (@nickpellant)
Changes
- Ruby
Published by bbatsov about 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.24.1
Bug fixes
- #10313: Fix autocorrect
Style/MapToHashwith multiline code. (@tejasbubane) - #10251: Fix an incorrect autocorrect for
Gemspec/RequireMFAwhen .gemspec file containsmetadatakeys assignments. (@fatkodima) - #10329: Fix a false positive for
Lint/ParenthesesAsGroupedExpressionand an incorrect autocorrect for the cop withStyle/TernaryParentheseswhen using ternary expression as a first argument. (@koic) - #10317: Fix a false positive for
Style/MethodCallWithArgsParentheseswhen using hash value omission. (@koic) - #10333: Fix an incorrect autocorrect for
Naming/BlockForwardingusing explicit block forwarding without method definition parentheses. (@koic) - #10321: Make
Style/MethodDefParenthesesaware of Ruby 3.1's anonymous block forwarding. (@koic) - #10320: Fix an incorrect autocorrect for
Style/FileWritewhen using heredoc argument. (@koic) - #10319: Require rubocop-ast 1.15.1 to fix a false positive for
Style/CombinableLoopwhen the same method with different arguments and safe navigation. (@koic)
- Ruby
Published by bbatsov about 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.24
New features
- #10279: Support Ruby 3.1's anonymous block forwarding syntax. (@koic)
- #10295: Support Ruby 3.1's hash value omission syntax for
Layout/HashAlignment. (@koic) - #10303: Add
AllowedNumbersoption toStyle/NumericLiterals. (@koic) - #10290: Add new
Naming/BlockForwardingcop. (@koic) - #10289: Add
EnforcedShorthandSyntaxoption toStyle/HashSyntaxcop to support Ruby 3.1's hash value omission syntax by default. (@koic) - #10257: Add new
Style/MapToHashcop. (@dvandersluis) - #10261: Add new
Style/FileReadcop. (@leoarnold) - #10291: Support Ruby 3.1's hash value omission syntax for
Layout/SpaceAfterColon. (@koic) - #10260: Add new
Style/FileWritecop. (@leoarnold) - #10307: Support Ruby 2.7's numbered parameter for
Metrics/BlockLength,Metrics/ClassLength,Metrics/MethodLength, andMetrics/ModuleLengthcops. (@koic) - #7671: Add cli option
--show-docs-urlto print out documentation url for given cops. (@HeroProtagonist) - #10308: Make
Style/CollectionCompactaware of block pass argument. (@koic)
Bug fixes
- #10285: Fix an incorrect autocorrect for
Style/SoleNestedConditionalwhen using nestedifwithinif foo = bar. (@koic) - #10309: Fix a false positive for
Bundler/DuplicatedGemwhen a gem conditionally duplicated within multi-statement bodies. (@fatkodima) - #10300: Fix an incorrect autocorrect for
Layout/DotPositionandStyle/RedundantSelfwhen auto-correction conflicts. (@koic) - #10284: Fix an incorrect autocorrect for
Style/RedundantRegexpCharacterClasswhen regexp containing an unescaped#. (@koic) - #10265: Fix
Style/IfInsideElseto be able to handleif-thennested inside anelsewithout clobbering. (@dvandersluis) - #10297: Fix a false positive for
Lint/DeprecatedOpenSSLConstantwhen building digest using an algorithm string and nested digest constants. (@koic) - #10282: Fix an incorrect autocorrect for
Style/EmptyCaseConditionwhen usingwhen ... thenincasein a method call. (@koic) - #10273: Fix a false positive for
InternalAffairs/UndefinedConfigto suppress a false wrong namespace warning. (@koic) - #10305: Fix an incorrect autocorrect for
Style/HashConversionwhen usingHash[a || b]. (@koic) - #10264: Fix the following incorrect auto-correct for
Style/MethodCallWithArgsParentheseswithLayout/SpaceBeforeFirstArg. (@koic) - #10276: Fix an incorrect autocorrect for
Style/RedundantInterpolationwhen using a method call without parentheses in string interpolation. (@koic)
Changes
- #10253: Deprecate
RuboCop::Cop::EnforceSuperclassmodule. (@koic) - #10248: Make
Lint/DeprecatedClassMethodsaware ofENV.freeze. (@koic) - #10269: Mark
Lint/IncompatibleIoSelectWithFiberScheduleras unsafe auto-correction. (@koic) - #8586: Add configuration parameter
AllowForAlignmentinLayout/CommentIndentation. (@jonas054)
- Ruby
Published by bbatsov about 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.23
New features
- #10202: Add new
Lint/UselessRuby2Keywordscop. (@dvandersluis) - #10217: Add new
Style/OpenStructUsecop. (@mttkay) - #10243: Add new
Gemspec/RequireMFAcop. (@dvandersluis)
Bug fixes
- #10203: Fix
Style/FormatStringTokento respectIgnoredMethodswith nested structures. (@tejasbubane) - #10242: Fix
last_columnvalue forJSONFormatter. (@koic) - #10229: Fix a false positive for
Style/StringLiteralswhenEnforcedStyle: double_quotesand using single quoted string with backslash. (@koic) - #10174: Fix inherit_from_remote should follow remote includes path starting with
./. (@hirasawayuki) - #10234: Fix an error for
Style/Documentationwhen using a cbase class. (@koic) - #10227: Fix a false positive for
Style/ParenthesesAroundConditionwhen parentheses in multiple expressions separated by semicolon. (@koic) - #10230: Fix a false positive for
Lint/AmbiguousRangewhen a range is composed of all literals except basic literals. (@koic)
Changes
- #10221: Update
Naming::FileNameto recognizeStructs as classes that satisfy theExpectMatchingDefinitionrequirement. (@dvandersluis) - #10220: Update
Naming/FileNameto makeCheckDefinitionPathHierarchyroots configurable. (@grosser) - #10199: Change
AllowAdjacentOneLineDefsconfig parameter ofLayout/EmptyLineBetweenDefstotrueby default . (@koic) - #10236: Make
Lint/NumberConversionaware ofto_r. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.22.3
Bug fixes
- #10166: Fix a false positive for
Style/StringLiteralswhen using some meta characters (e.g.'\s','\z') withEnforcedStyle: double_quotes. (@koic) - #10216: Fix an incorrect autocorrect for
Style/SelectByRegexpwhen usinglvar =~ blockvarin a block. (@koic) - #10207: Fix false positive in Layout/DotPosition when the selector is on the same line as the closing bracket of the receiver. (@mvz)
Changes
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.22.2
Bug fixes
- #10165: Fix
Layout/DotPositionfalse positives when the selector and receiver are on the same line. (@dvandersluis) - #10171: Fix
Style/HashTransformKeysandStyle/HashTransformValuesincorrect auto-correction when inside block body. (@franzliedke) - #10180: Fix an error for
Style/SelectByRegexpwhen usingmatch?without a receiver. (@koic) - #10193: Fix an error for
Layout/EmptyLinesAroundExceptionHandlingKeywordswhenbeginandrescueare on the same line. (@koic) - #10185: Fix a false positive for
Lint/AmbiguousRangewhen usingselfin a range literal. (@koic) - #10200: Fix an error when inspecting a directory named
*. (@koic) - #10149: Fix
Bundler/GemCommentwhere it would not detect an offense in some cases whenOnlyForis set torestrictive_version_specifiers. (@Drowze)
Changes
- #10157: Updated
Gemspec/RequiredRubyVersionhandle being set to blank values. (@dvandersluis) - #10176: Unmark
AutoCorrect: falsefromSecurity/JSONLoad. (@koic) - #10186: Explicit block arg is not counted for
Metrics/ParameterLists. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.22.1
Bug fixes
- #10143: Fix an error for
Lint/RequireRelativeSelfPathwhen using a variable as an argument ofrequire_relative. (@koic) - #10140: Fix false positive for
Layout/DotPositionwhen a heredoc receives a method on the same line as the start sigil intrailingstyle. (@dvandersluis) - #10148: Fix
Style/QuotedSymbolshandling escaped characters incorrectly. (@dvandersluis) - #10145: Update
Style/SelectByRegexpto ignore cases where the receiver appears to be a hash. (@dvandersluis)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.22
New features
- #10111: Add new
Style/NumberedParametersLimitcop. (@dvandersluis) - #10025: Changed cop
SpaceInsideParensto include acompactstyle. (@itay-grudev) - #10084: Add new
Lint/RequireRelativeSelfPathcop. (@koic) - #8327: Add new cop
Style/SelectByRegexp. (@dvandersluis) - #10100: Add new
Style/NumberedParameterscop. (@Hugo-Hache) - #10103: Add
AllowHttpProtocoloption toBundler/InsecureProtocolSource. (@koic) - #10102: Add new
Security/IoMethodscop. (@koic)
Bug fixes
- #10110: Update
Layout/DotPositionto be able to handle heredocs. (@dvandersluis) - #10134: Update
Style/MutableConstantto not consider multiline uninterpolated strings as unfrozen in ruby 3.0. (@dvandersluis) - #10124: Fix
Layout/RedundantLineBreakadding extra space within method chains. (@dvandersluis) - #10118: Fix crash with
Style/RedundantSortwhen the block doesn't only contain a singlesendnode. (@dvandersluis) - #10135: Fix
Style/WordArrayto exclude files in--auto-gen-configwhenpercentstyle is given but brackets are required. (@dvandersluis) - #10090: Fix a false negative for
Style/ArgumentsForwardingwhen using only kwrest arg. (@koic) - #10099: Update
Style/RedundantFreezeto stop consideringENVvalues as immutable. (@byroot) - #10078: Fix
Layout/LineLengthreported length when ignoring directive comments. (@dvandersluis) - #9934: Fix configuration loading to not raise an error for an obsolete ruby version that is subsequently overridden. (@dvandersluis)
- #10136: Update
Lint/AssignmentInConditionto not consider assignments within blocks in conditions. (@dvandersluis) - #9588: Fix causing a variable to be shadowed from outside the rescue block in the logic of Naming/RescuedExceptionsVariableName. (@lilisako)
- #10096: Fix
Lint/AmbiguousOperatorPrecedencewithand/oroperators. (@dvandersluis) - #10106: Fix
Style/RedundantSelffor pattern matching. (@dvandersluis) - #10066: Fix how
MinDigitsis calculated forStyle/NumericLiteralswhen generating a configuration file. (@dvandersluis)
Changes
- #10088: Update
Lint/BooleanSymbolto beSafeAutoCorrect: falserather thanSafe: false. (@dvandersluis) - #10122: Update
Style/RedundantSortto be unsafe, and revert the special case forsizefrom #10061. (@dvandersluis) - #10130: Update
Lint/ElseLayoutto be able to handle anelsewith only a single line. (@dvandersluis) - #8431: Add
Safetysection to documentation for all cops that areSafe: falseorSafeAutoCorrect: false. (@dvandersluis)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.21
New features
- #7849: Add new
Lint/AmbiguousOperatorPrecedencecop. (@dvandersluis) - #9061: Add new
Lint/IncompatibleIoSelectWithFiberSchedulercop. (@koic)
Bug fixes
- #10067: Fix an error for
Lint/NumberConversionwhen using nested number conversion methods. (@koic) - #10054: Fix a false positive for
Layout/SpaceAroundOperatorswhen match operators between<<and+=. (@koic) - #10061: Fix a false positive for
Style/RedundantSortwhen usingsizemethod in the block. (@koic) - #10063: Fix a false positive for
Layout/SingleLineBlockChainwhen method call chained on a new line after a single line block with trailing dot. (@koic) - #10064: Fix
Style/ExplicitBlockArgumentcorrector assuming any existing block argument was namedblock. (@byroot) - #10070: Fix a false positive for
Style/MutableConstantwhen using non-interpolated heredoc in Ruby 3.0. (@koic)
Changes
- #9674: Disable
Style/AsciiCommentsby default. (@dvandersluis) - #10051: Improve the messaging for
Style/Documentationto be more clear about what class/module needs documentation. (@dvandersluis) - #10074: Update
Naming/InclusiveLanguageto be disabled by default. (@dvandersluis) - #10068: Mark
Style/AndOras unsafe auto-correction. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.19.1
Bug fixes
- #10017: Fixan error for
Layout/RescueEnsureAlignmentwhen using zsuper with block. (@koic) - #10011: Fix a false positive for
Style/RedundantSelfAssignmentBranchwhen using instance variable, class variable, and global variable. (@koic) - #10010: Fix a false positive for
Style/DoubleNegationwhen!!is used at return location and beforerescuekeyword. (@koic) - #10014: Fix
Style/Encodingto handle more situations properly. (@dvandersluis) - #10016: Fix conflict between
Style/SoleNestedConditionalandStyle/NegatedIf/Style/NegatedUnless. (@dvandersluis) - #10024: Fix an incorrect auto-correct for
Style/RedundantSelfAssignmentBranchwhen using multilineif/elseconditional assignment. (@koic) - #10004: Fix a false positive for
Style/RedundantBeginwhen using one-liner with semicolon. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.20
New features
- #10040: Make
Lint/Debuggeraware of debug.rb. (@koic) - #9580: Add a new cop that enforces which bundler gem file to use. (@gregfletch)
Bug fixes
- #10033: Fix an incorrect auto-correct for
Style/BlockDelimiterswhen there is a comment after the closing brace and using method chanin. (@koic) - #6630: Updated
Style/CommentAnnotationto be able to handle multiword keyword phrases. (@dvandersluis) - #7836: Update
Style/BlockDelimetersto addbegin...endwhen converting a block containingrescueorensureto braces. (@dvandersluis) - #10031: Fix a false positive for
Style/HashExceptwhen comparing with hash value. (@koic)
Changes
- #10034: Add
RubyJarddebugger calls to Lint/Debugger/DebuggerMethods. (@DanielVartanov) - #10006: Interpolated string literals are no longer frozen since Ruby 3.0. (@splattael)
- #9328: Recognize shareable_constant_value magic comment. (@thearjunmdas, @caalberts)
- #10036: Mark
Style/StructInheritanceas unsafe auto-correction. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.19
New features
- #4182: Add
Lint/AmbiguousRangecop to check for ranges with ambiguous boundaries. (@dvandersluis) - #10000: Parallel static analysis by default. (@koic)
- #9948: Support Ruby 2.7's pattern matching for
Style/ConditionalAssignmentcop. (@koic) - #9999: Add new
Style/RedundantSelfAssignmentBranchcop. (@koic)
Bug fixes
- #9927: Indent hash values in
Layout/LineEndStringConcatenationIndentation. (@jonas054) - #9959: Make
Style/IdenticalConditionalBranchesable to handle ternaryifs. (@dvandersluis) - #9946: Avoid slow regexp matches in
Style/CommentedKeyword. (@jonas054) - #7422: Treat constant assignment like other assignment in
Layout/SpaceAroundOperators. (@dvandersluis) - #9953: Fix an infinite loop error and a false auto-correction behavior for
Layout/EndAlignmentwhen using a conditional statement in a method argument. (@koic) - #9958: Prevent an infinite loop when a detected method has fewer arguments than expected. (@dvandersluis)
- #9977: Update
Layout/EmptyLineAfterGuardClauseto not register an offense if there is another expression following the guard clause on the same line. (@dvandersluis) - #9980: Fix a false positive for
Style/IdenticalConditionalBrancheswhen assigning to a variable used in a condition. (@koic) - #9975: Parentheses are always required for
Style/MethodDefParentheseswhen a forwarding argument (...) is used. (@dvandersluis) - #9984: Fix false negatives involving heredocs for
Layout/SpaceBeforeComma,Layout/SpaceBeforeComment,Layout/SpaceBeforeSemicolonandLayout/SpaceInsideParens. (@dvandersluis) - #9954: Fix infinite loop error for
Layout/HashAlignmentwhenEnforcedStyle: with_fixed_indentationis specified forLayout/ArgumentAlignment. (@koic) - #10002: Fix an incorrect auto-correct for
Lint/AmbigousRegexpLiteralwhen using nested method arguments without parentheses. (@koic) - #9952 rubocop-rspec#1126: Fix
inherit_modefor deeply nested configuration defined in extensions' default configuration. (@pirj) - #9957: Add
WholeWordconfiguration toNaming/InclusiveLanguage'sFlaggedTermsconfig. (@dvandersluis) - #9970: Don't register an offense when sort method has arguments for
Style/RedundantSortcop. (@mtsmfm) - #4097: Add require English for special globals. (@biinari)
- #9955: Fix
Style/ExplicitBlockArgumentadding a second set of parentheses. (@dvandersluis) - #9973: Fix a false positive for
Layout/RescueEnsureAlignmentwhen alignedrescuekeyword and leading dot. (@koic) - #9945: Fix auto-correction of lines in heredocs with only spaces in
Layout/TrailingWhitespace. (@jonas054)
Changes
- #9989: Mark
Style/CommentedKeywordas unsafe auto-correction. (@koic) - #9964: Make
Layout/LeadingCommentSpaceaware of#:nodoc. (@koic) - #9985: Mark
Style/IdenticalConditionalBranchesas unsafe auto-correction. (@koic) - #9962: Update
Style/WordArrayto register an offense inpercentstyle if any values contain spaces. (@dvandersluis) - #9979: Enable basic autocorrection for
Style/Semicolon. (@dvandersluis)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.18.4
New features
Bug fixes
- #9938: Fix an incorrect auto-correct for
Layout/LineLengthwhen a heredoc is used as the first element of an array. (@koic) - #9940: Fix an incorrect auto-correct for
Style/HashTransformValueswhen value is a hash literal for_.to_h{...}. (@koic) - #9752: Improve error message for top level department used in configuration. (@jonas054)
- #9933: Fix GitHub Actions formatter when running in non-default directory. (@ojab)
- #9922: Make better auto-corrections in
Style/DoubleCopDisableDirective. (@jonas054) - #9848: Fix handling of comments in
Layout/ClassStructureauto-correct. (@jonas054) - #9926: Fix an incorrect auto-correct for
Style/SingleLineMethodswhen method body is enclosed in parentheses. (@koic) - #9928: Fix an infinite loop error and a false auto-correction behavior for
Layout/EndAlignmentwhen using operator methods andEnforcedStyleAlignWith: variable. (@koic) - #9434: Fix false positive for setter calls in
Layout/FirstArgumentIndentation. (@jonas054)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.18.3
Bug fixes
- #9891: Fix
--auto-gen-configbug forStyle/HashSyntax. (@jonas054) - #9905: Fix false positive for single line concatenation in
Layout/LineEndStringConcatenationIndentation. (@jonas054) - #9907: Fix an incorrect auto-correct for
Lint/UselessTimeswhen using block argument for1.times. (@koic) - #9869: Fix reference to file in configuration override warning. (@jonas054)
- #9902: Fix an incorrect auto-correct for
Style/BlockDelimiterswhen there is a comment after the closing brace. (@koic) - #8469: Add inspection of
class <<toLayout/SpaceAroundOperators. (@jonas054) - #9909: This PR fixes an incorrect auto-correct for
Style/SingleLineMethodswhen usingreturn,break, ornextfor one line method body in Ruby 3.0. (@koic) - #9914: Fix an error for
Layout/HashAlignmentwhen using aligned hash argument forproc.(). (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.18.2
Bug fixes
- #9894: Handle multiline string literals in
Layout/LineEndStringConcatenationIndentation. (@jonas054) - #9890: Make colon after comment annotation configurable. (@gregfletch)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.18.1
Bug fixes
- #9897: Fix an incorrect auto-correct for
Layout/HashAlignmentwhen settingEnforcedStyle: with_fixed_indentationofLayout/ArgumentAlignmentand using misaligned keyword arguments. (@koic)
Changes
- #9895: Set
CheckStrings: falseand RemovemasterfromFlaggedTermsforNaming/InclusiveLanguage. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.18
New features
Bug fixes
- #9803: Fix
Bundler/GemVersioncop not respecting git tags. (@tejasbubane, @timlkelly) - #9882: Fix an incorrect auto-correct for
Layout/LineLengthwhen using heredoc as the first method argument and omitting parentheses. (@koic) - #7592: Add cop
Layout/LineEndStringConcatenationIndentation. (@jonas054) - #9880: Fix a false positive for
Style/RegexpLiteralwhen using a regexp starts with a blank as a method argument. (@koic) - #9888: Fix a false positive for
Layout/ClosingParenthesisIndentationwhen using keyword arguemnts. (@koic) - #9886: Fix indentation in Style/ClassAndModuleChildren. (@markburns)
Changes
- #9144: Add
aggressiveandconservativemodes of operation forStyle/StringConcatenationcop. (@tejasbubane)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.17
New features
- #9626: Disable all cop department with directive comment. (@AndreiEres)
- #9827: Add basic auth support to download raw yml config from private repo. (@AirWick219)
- #9873: Support one-line pattern matching syntax for
Layout/SpaceAroundKeywordandLayout/SpaceAroundOperators. (@koic) - #9857: Support Ruby 2.7's pattern matching for
Layout/IndentationWidthcop. (@koic) - #9877: Support Ruby 2.7's
inpattern syntax forLint/LiteralAsCondition. (@koic) - #9855: Support Ruby 2.7's pattern matching for
Style/IdenticalConditionalBranchescop. (@koic)
Bug fixes
- #9874: Fix a false positive for
Style/RegexpLiteralwhen using%rregexp literal withEnforcedStyle: omit_parenthesesofStyle/MethodCallWithArgsParentheses. (@koic) - #9876: Fix empty line after guard clause with
and returnand heredoc. (@AndreiEres) - #9861: Fix error in
Layout/HashAlignmentwith an empty hash literal. (@dvandersluis) - #9867: Fix an incorrect auto-correct for
Layout/DotPositionwhen using only dot line. (@koic)
- Ruby
Published by koic over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.16.1
Bug fixes
- #9843: Fix
Style/RedundantSelfto allow conditional nodes to useselfin the condition when a variable named is shadowed inside. (@dvandersluis) - #9845: Fix
Style/QuotedSymbolsfor hash-rocket hashes. (@dvandersluis) - #9849: Fix a false negative for
Layout/HashAlignmentwhen settingEnforcedStyle: with_fixed_indentationofLayout/ArgumentAlignmentand using misaligned keyword arguments. (@koic) - #9854: Allow braced numeric blocks in
omit_parenthesesstyle ofStyle/MethodCallWithArgsParentheses. (@gsamokovarov) - #9850: Fix missing
AllowCommentsoption forLint/EmptyInPattern. (@koic)
- Ruby
Published by bbatsov over 4 years ago
https://github.com/rubocop/rubocop - RuboCop 1.16
New features
- #9841: Support guard
ifandunlesssyntax keywords of Ruby 2.7's pattern matching forLayout/SpaceAroundKeyword. (@koic) - #9812: Support auto-correction for
Style/IdenticalConditionalBranches. (@koic) - #9833: Add new
Style/InPatternThencop. (@koic) - #9840: Adds
AllowedReceiversoption forStyle/HashEachMethods. (@koic) - #9818: Support Ruby 2.7's
inpattern syntax forLayout/CaseIndentation. (@koic) - #9793: Add
Style/QuotedSymbolsto enforce consistency in quoted symbols. (@dvandersluis) - #9825: Add new
Lint/EmptyInPatterncop. (@koic) - #9834: Add new
Style/MultilineInPatternThencop. (@koic)
Bug fixes
- #9822: Fix a false directive comment range for
Lint/RedundantCopDisableDirective. (@koic) - #9819: Fix a false negative for
Style/TopLevelMethodDefinitionwhen defining a top-level method after a class definition. (@koic) - #9836: Fix incorrect corrections for
Layout/HashAlignmentwhen akwsplatnode is on the same line as apairnode with table style. (@dvandersluis) - #9805: Fix a false negative for
Layout/HashAlignmentwhen setEnforcedStyle: with_fixed_indentationofArgumentAlignment. (@koic) - #9811: Fix an error for
Layout/ArgumentAlignmentwithLayout/FirstHashElementIndentationwhen settingEnforcedStyle: with_fixed_indentation. (@koic)
Changes
- #9809: Change
Lint/SymbolConversionto only quote with double quotes, sinceStyle/QuotedSymbolscan now correct those to the correct quotes as per configuration. (@dvandersluis)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.15
New features
- #9734: Add
Style/TopLevelMethodDefinitioncop. (@tejasbubane) - #9780: Support summary report for
JUnitFormatter. (@koic) - #9798: Make
Layout/ArgumentAlignmentaware of kwargs. (@koic)
Bug fixes
- #9749: Fix autocorrection for
Layout/LineLengthto not move the first argument of an unparenthesizedsendnode to the next line, which changes behaviour. (@dvandersluis) - #9799: Fix invalid line splitting by
Layout/LineLengthforsendnodes with heredoc arguments. (@dvandersluis) - #9773: Fix
Style/EmptyLiteralto not register offenses forString.newwhenStyle/FrozenStringLiteralis enabled. (@dvandersluis) - #9771: Change
AllowDSLWritersto true by default forStyle/TrivialAccessors. (@koic) - #9777: Fix an incorrect auto-correct for
Style/RedundantBeginwhen using multi-lineifinbeginblock. (@koic) - #9791: Fix a false negative for
Layout/IndentationWidthwhen usingensureindo...endblock. (@koic) - #9766: Fix a clobbering error for
Style/ClassAndModuleChildrencop with compact style. (@tejasbubane) - #9767: Fix
Style/ClassAndModuleChildrencop to preserve comments. (@tejasbubane) - #9792: Fix false positive for
Lint/Voidcop with ranges. (@tejasbubane)
Changes
- #9770: Update
Lint/EmptyBlockto handle procs the same way as lambdas. (@dvandersluis) - #9776: Update
Style/NilLambdato handle procs as well. (@dvandersluis) - #9744: The parallel flag will now be automatically ignored when combined with
--cache false. Previously, an error was raised and execution stopped. (@rrosenblum)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.14
New features
- #7669: New cop
Bundler/GemVersionrequires or forbids specifying gem versions. (@timlkelly) - #9758: Support
TargetRubyVersion 3.1(experimental). (@koic) - #9377: Add cop
Layout/SingleLineBlockChain. (@jonas054)
Bug fixes
- #9751:
Style/StringLiteraldoesn't autocorrect global variable interpolation. (@etiennebarrie) - #9731: Fix two autocorrection issues for
Style/NegatedIfElseCondition. (@dvandersluis) - #9740: Fix an incorrect auto-correct for
Style/SingleLineMethodswhen defining setter method. (@koic) - #9757: Fix a false positive for
Lint/NumberConversionwhen:to_fis one of multiple method arguments. (@koic) - #9761: Fix
Style/ClassAndModuleChildrenfalse negative forcompactstyle when a class/module is partially nested. (@dvandersluis) - #9748: Prevent infinite loops during symlink traversal. (@Tonkpils)
- #9762: Update
VariableForceto be able to handlecase-matchnodes. (@dvandersluis) - #9729: Fix an error for
Style/IfUnlessModifierwhen variable assignment is used in the branch body of if modifier. (@koic) - #9750: Fix an incorrect auto-correct for
Style/SoleNestedConditionalwhen when using nestedifwithinunless foo == bar. (@koic) - #9751:
Style/StringLiteralautocorrects'\\'into"\\". (@etiennebarrie) - #9732: Support deprecated Socket.gethostbyaddr and Socket.gethostbyname. (@AndreiEres)
- #9713: Fix autocorrection for block local variables in
Lint/UnusedBlockArgument. (@tejasbubane) - #9746: Fix a false positive for
Lint/UnreachableLoopwhen using conditionalnextin a loop. (@koic)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.13
New features
- #7977: Add
Layout/RedundantLineBreakcop. (@jonas054) - #9691: Add configuration parameter
InspectBlockstoLayout/RedundantLineBreak. (@jonas054) - #9684: Support
IgnoredMethodsoption forLint/AmbguousBlockAssociation. (@gprado) - #9358: Support
restrictive_version_specificiersoption inBundler/GemCommentcop. (@RobinDaugherty)
Bug fixes
- #5576: Fix problem with inherited
Includeparameters. (@jonas054) - #9690: Fix an incorrect auto-correct for
Style/IfUnlessModifierwhen using a method with heredoc argument. (@koic) - #9681: Fix an incorrect auto-correct for
Style/RedundantBeginwhen using modifierifsingle statement inbeginblock. (@koic) - #9698: Fix an error for
Style/StructInheritancewhen extending instance ofStructwithoutdo...endand class body is empty and single line definition. (@koic) - #9700: Avoid warning about Ruby version mismatch. (@marcandre)
- #9636: Resolve symlinks when excluding directories. (@ob-stripe)
- #9707: Fix false positive for
Style/MethodCallWithArgsParentheseswithomit_parenthesesstyle on an endlessdefsnode. (@dvandersluis) - #9689: Treat parens around array items the same for children and deeper descendants. (@dvandersluis)
- #9676: Fix an error for
Style/StringCharswhen usingsplitwithout parentheses. (@koic) - #9712: Fix an incorrect auto-correct for
Style/HashConversionwhenHash[]as a method argument without parentheses. (@koic) - #9704: Fix an incorrect auto-correct for
Style/SingleLineMethodswhen single line method call without parentheses. (@koic) - #9683: Fix an incorrect auto-correct for
Style/HashConversionwhen usingzipmethod without argument inHash[]. (@koic) - #9715: Fix an incorrect auto-correct for
EnforcedStyle: require_parenthesesofStyle/MethodCallWithArgsParentheseswithStyle/RescueModifier. (@koic)
Changes
- #7544: Add --no-parallel (-P/--parallel can not be combined with --auto-correct). (@kwerle)
- #9648: Drop support for Ruby 2.4. (@koic)
- #9647: The parallel flag will now be automatically ignored when combined with
--auto-correct,--auto-gen-config, or-F/--fail-fast. Previously, an error was raised and execution stopped. (@rrosenblum)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.12.1
Bug fixes
- #9649: Fix when highlights contain multibyte characters. (@osyo-manga)
- #9646: Fix an incorrect auto-correct for
EnforcedStyle: require_parenthesesofStyle/MethodCallWithArgsParentheseswithEnforcedStyle: conditionalsofStyle/AndOr. (@koic) - #9608: Fix a false positive for
Layout/EmptyLineAfterGuardClausewhen using guard clause is afterrubocop:enablecomment. (@koic) - #9637: Allow parentheses for forwarded args in
Style/MethodCallWithArgsParentheses'somit_parenthesesstyle to avoid endless range ambiguity. (@gsamokovarov) - #9641: Fix
Layout/MultilineMethodCallIndentationtriggering on method calls that look like operators. (@dvandersluis) - #9638: Fix an error for
Layout/LineLengthwhen over limit at right hand side of multiple assignment. (@koic) - #9639: Fix
Style/RedundantBeginremoving comments on assignment statement correction. (@marcotc) - #9671: Fix an incorrect auto-correct for
Lint/AmbiguousOperatorwithStyle/MethodCallWithArgsParentheses. (@koic) - #9645: Fix an incorrect auto-correct for
Style/SingleLineMethodswhen using single line class method definition. (@koic) - #9644: Fix an error and an incorrect auto-correct for
Style/MultilineMethodSignaturewhen line break after opening parenthesis. (@koic) - #9672: Fix an incorrect auto-correct for
Style/HashConversionwhen using multi-argumentHash[]as a method argument. (@koic)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.12
New features
- #9615: Add new
Style/StringCharscop. (@koic) - #9629: Add
AllowParenthesesInStringInterpolationconfiguration toStyle/MethodCallWithArgsParenthesesto allow parenthesized calls in string interpolation. (@gsamokovarov) - #9219: Allow excluding some constants from Style/Documentation. (@fsateler)
- Add
AllowNiloption forLint/SuppressedExceptionto allow/disallowrescue nil. (@corroded)
Bug fixes
- #9560: Fix an error for
Lint/ClassMethodsDefinitionswhen defining class methods withclass << selfwith comment only body. (@koic) - #9551: Fix a false positive for
Style/UnlessLogicalOperatorswhen using||operator and invoked method name includes "or" in the conditional branch. (@koic) - #9620: Allow parentheses in operator methods calls for
Style/MethodCallWithArgsParenthesesEnforcedStyle: omit_parentheses. (@gsamokovarov) - #9622: Fixed
Style/BisectedAttrAccessorautocorrection to handle multiple bisected attrs in the same macro. (@dvandersluis) - #9606: Fix an error for
Layout/IndentationConsistencywhen using access modifier at the top level. (@koic) - #9619: Fix infinite loop between
Layout/IndentationWidthandLayout/RescueEnsureAlignmentautocorrection. (@dvandersluis) - #9633: Fix an incorrect auto-correct for
Lint/NumberConversionwhento_imethod in symbol form. (@koic) - #9616: Fix an incorrect auto-correct for
Style/EvalWithLocationwhen using#instance_evalwith a string argument in parentheses. (@koic) - #9429: Fix
Style/NegatedIfElseConditionautocorrect to keep comments in correct branch. (@tejasbubane) - #9631: Fix an incorrect auto-correct for
Style/RedundantReturnwhen usingreturnwith splat argument. (@koic) - #9627: Fix an incorrect auto-correct for
Style/StructInheritancewhen extending instance of Struct withoutdo...endand class body is empty. (@koic) - #5953: Fix a false positive for
Style/AccessModifierDeclarationswhen usingmodule_functionwith symbol. (@koic) - #9593: Fix an error when processing a directory is named
{}. (@koic) - #9599: Fix an error for
Style/CaseLikeIfwhen usinginclude?without a receiver. (@koic) - #9582: Fix incorrect auto-correct for
Style/ClassEqualityComparisonwhen comparingModule#namefor equality. (@koic) - #9603: Fix a false positive for
Style/SoleNestedConditionalwhen using nested modifier on value assigned in condition. (@koic) - #9598: Fix RuboCop::MagicComment#valid_shareable_constant_value?. (@kachick)
- #9625: Allow parentheses in yield arguments with
Style/MethodCallWithArgsParenthesesEnforcedStyle: omit_parenthesesto fix invalid Ruby auto-correction. (@gsamokovarov) - #9558: Fix inconsistency when dealing with URIs that are wrapped in single quotes vs double quotes. (@dvandersluis)
- #9613: Fix a false positive for
Style/RedundantSelfwhen a self receiver on an lvalue of mlhs arguments. (@koic) - #9586: Update
Naming/RescuedExceptionsVariableNameto not register on inner rescues when nested. (@dvandersluis)
Changes
- #9487: Mark Naming/MemoizedInstanceVariableName as unsafe. (@marcandre)
- #9601: Make
Style/RedundantBeginaware of redundantbegin/endblocks around memoization. (@koic) - #9617: Disable suggested extensions when using the
--stdinoption. (@dvandersluis)
- Ruby
Published by bbatsov almost 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.11
New features
- #5388: Add new
Style/UnlessLogicalOperatorscop. (@caalberts) - #9525: Add
AllowMethodsWithArgumentsoption toStyle/SymbolProc. (@koic)
Bug fixes
- #9520: Fix an incorrect auto-correct for
Style/MultipleComparisonwhen comparing a variable with multiple items inifandelsifconditions. (@koic) - #9548: Fix a false positive for
Style/TrailingBodyOnMethodDefinitionwhen endless method definition body is after newline in opening parenthesis. (@koic) - #9541: Fix
Style/HashConversionwhen the correction needs to be wrapped in parens. (@dvandersluis) - #9533: Make metrics length cops aware of multi-line kwargs. (@koic)
- #9523: Fix an error for
Style/TrailingMethodEndStatementwhen endless method definition signature and body are on different lines. (@koic) - #9482: Return minimal known ruby version from gemspecs
required_ruby_version. (@HeroProtagonist) - #9539: Fix an error for
Style/RedundantBeginwhen using body ofbeginis empty. (@koic) - #9542: Fix
Layout/FirstArgumentIndentationfor operator methods not called as operators. (@dvandersluis, @TSMMark)
Changes
- #9526: Add
AllowSplatArgumentoption toStyle/HashConversionand the option is true by default. (@koic)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.10
New features
- #9478: Add new
Style/HashConversioncop. (@zverok) - #9496: Add new
Gemspec/DateAssignmentcop. (@koic) - #8724: Add
IgnoreModulesconfiguration toStyle/ConstantVisibilityto not register offense for module definitions. (@tejasbubane) - #9403: Add autocorrect for
Style/EvalWithLocationcop. (@cteece)
Bug fixes
- #9500: Update
Lint/Debuggerso that only specific receivers for debug methods lead to offenses. (@dvandersluis) - #9499: Fix a false positive for
Layout/SpaceBeforeBracketswhen multiple spaces are inserted inside the left bracket. (@koic) - #9507: Fix an incorrect auto-correct for
Lint/RedundantSplatExpansionwhen expandingArray.newcall on method argument. (@koic) - #9490: Fix incorrect auto-correct for
Layout/FirstArgumentIndentationwhen specifyingEnforcedStyle: with_fixed_indentationofLayout/ArgumentAlignmentandEnforcedStyle: consistentofLayout/FirstArgumentIndentation. (@koic) - #9497: Fix an error for
Style/ExplicitBlockArgumentwhenyieldis inside block ofsuper. (@koic) - #9349: Fix a false positive for
Lint/MultipleComparisonwhen using&,|, and^set operation operators in multiple comparison. (@koic) - #9511: Fix a false negative for
Lint/ElseLayoutwhen using multipleelsifs. (@koic) - #9513: Fix an incorrect auto-correct for
Style/HashConversionwhen using hash argumentHash[]. (@koic) - #9492: Fix an incorrect auto-correct for
Lint/DeprecatedOpenSSLConstantwhen using no argument algorithm. (@koic)
Changes
- #9405: Improve documentation for
Style/EvalWithLocationcop. (@taichi-ishitani)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.9.1
New features
- #9459: Add
AllowedMethodsoption toStyle/IfWithBooleanLiteralBranchesand setnonzero?as default value. (@koic)
Bug fixes
- #9431: Fix an error for
Style/DisableCopsWithinSourceCodeDirectivewhen using leading source comment. (@koic) - #9444: Fix error on colorization for offenses with
Severity: info. (@tejasbubane) - #9448: Fix an error for
Style/SoleNestedConditionalwhen using nestedunlessmodifier with a single expression condition. (@koic) - #9449: Fix an error for
Style/NilComparisonwhen usingx == nilas a guard condition'. (@koic) - #9440: Fix
Lint/SymbolConversionfor implicitto_symwithout a receiver. (@dvandersluis) - #9453: Fix infinite loop error for
Layout/FirstParameterIndentationwhenEnforcedStyle: with_fixed_indentationis specified forLayout/ArgumentAlignment. (@koic) - #9466: Don't correct
Style/SingleLineMethodsusing endless methods if the target ruby is < 3.0. (@dvandersluis) - #9455: Fix a false positive for
Lint/SymbolConversionwhen hash keys that contain":". (@koic) - #9454: Fix an incorrect auto-correct for
Style/IfWithBooleanLiteralBrancheswhen usingelsif do_something?with boolean literal branches. (@koic) - #9438: Fix a false positive for
Layout/SpaceBeforeBracketswhen space is used in left bracket. (@koic) - #9457: Fix a false positive for
Lint/SymbolConversionwhen hash keys that end with=. (@koic) - #9473: Fix an error for
Lint/DeprecatedConstantswhen using__ENCODING__. (@koic) - #9452: Fix
StyleGuideBaseURLnot functioning with nested departments. (@tas50) - #9465: Update
Metrics/ParameterListsto be able to writeMaxOptionalParametersin rubocop_todo.yml. (@dvandersluis) - #9433: Fix an error for
Style/EvalWithLocationwhen using eval with block argument. (@koic)
Changes
- #9437: Improve offense message when there is an allowed range of empty lines. (@dvandersluis)
- #9476: Mark
Style/IfWithBooleanLiteralBrancheas unsafe auto-correction. (@koic)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.9
New features
- #9396: Add new
Style/IfWithBooleanLiteralBranchescop. (@koic) - #9402: Add new
Lint/TripleQuotescop. (@dvandersluis) - #7827: Add pre-commit hook. (@jdufresne, @adithyabsk)
- #7452: Support
IgnoredMethodsoption forStyle/FormatStringToken. (@koic) - #9340: Added
infoSeverity level to allow offenses to be listed but not return a non-zero error code. (@dvandersluis) - #9353: Add new
Lint/SymbolConversioncop. (@dvandersluis) - #9363: Add new cop
Lint/OrAssignmentToConstant. (@uplus) - #9326: Add new
Lint/NumberedParameterAssignmentcop. (@koic)
Bug fixes
- #9366: Fix an incorrect auto-correct for
Style/SoleNestedConditionalwhen using method arguments without parentheses for outer condition. (@koic) - #9372: Fix an error for
Style/IfInsideElsewhen nestedifbranch code is empty. (@koic) - #9374: Fix autocorrection for
Layout/LineLengthwhen the first argument to a send node is a overly long hash pair. (@dvandersluis) - #9387: Fix incorrect auto-correct for
Style/NilComparisonwhen using!x.nil?andEnforcedStyle: comparison. (@koic) - #9411: Fix false negatives for
Style/EvalWithLocationforKernel.evaland when given improper arguments. (@dvandersluis) - #7766: Fix
Naming/RescuedExceptionsVariableNameautocorrection when the rescue body returns the exception variable. (@asterite) - #7766: Fix
Naming/RescuedExceptionsVariableNameautocorrection to not change variables if the exception variable has been reassigned. (@dvandersluis) - #9389: Fix an infinite loop error for
IncludeSemanticChanges: falseofStyle/NonNilCheckwithEnforcedStyle: comparisonofStyle/NilComparison. (@koic) - #9384: Fix a suggestion message when not auto-correctable. (@koic)
- #9424: Fix an incorrect auto-correct for
Style/ClassMethodsDefinitionswhen defining class methods withclass << selfand there is no blank line between method definition and attribute accessor. (@koic) - #9370: Fix an incorrect auto-correct for
Style/SoleNestedConditionalwhen using nestedunlessmodifier multiple conditional. (@koic) - #9406: Fix rubocop_todo link injection when YAML doc start sigil exists. (@dduugg)
- #9229: Fix errors being reported with
rubocop -Vwith an invalid config. (@dvandersluis) - #9425: Fix error in
Layout/ClassStructurewhen initializer comes after private attribute macro. (@tejasbubane)
Changes
- #9415: Change
Layout/ClassStructureto detect inline modifiers. (@AndreiEres) - #9380: Mark
Style/FloatDivisionas unsafe. (@koic) - #9345: Make
Style/AsciiCommentsallow copyright notice by default. (@koic) - #9399: Added
AllowedCopsconfiguration toStyle/DisableCopsWithinSourceCodeDirective. (@dvandersluis) - #9327: Change
Layout/EmptyLineAfterMagicCommentto accept top-levelshareable_constant_valuesdirective. (@tejasbubane) - #7902: Change
Lint/NumberConversionto detect symbol form of conversion methods. (@tejasbubane)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop -
Bug fixes
- #9342: Fix an error for
Lint/RedundantDirGlobSortwhen usingcollection.sort. (@koic) - #9304: Do not register an offense for
Style/ExplicitBlockArgumentwhen theyieldarguments are not an exact match with the block arguments. (@dvandersluis) - #8281: Fix Style/WhileUntilModifier handling comments and assignment when correcting to modifier form. (@Darhazer)
- #8229: Fix faulty calculation in UncommunicativeName. (@ohbarye)
- #9350: Wrap in parens before replacing
unlesswithifand!. (@magneland) - #9356: Fix duplicate extension cop versions when using
rubocop -V. (@koic) - #9355: Fix
Style/SingleLineMethodsautocorrection to endless method when the original code had parens. (@dvandersluis) - #9346: Fix an incorrect auto-correct for
Style/StringConcatenationwhen concat string include double quotes and interpolation. (@k-karen)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.8
New features
- #9324: Add new
Lint/DeprecatedConstantscop. (@koic) - #9319: Support asdf's .tool-versions file. (@noon-ng)
- #9301: Add new
Lint/RedundantDirGlobSortcop. (@koic) - #9281: Add new cop
Style/EndlessMethod. (@dvandersluis)
Bug fixes
- #9298: Fix an incorrect auto-correct for
Lint/RedundantCopDisableDirectivewhen there is a blank line before inline comment. (@koic) - #9233: Fix
Style/SoleNestedConditionalcopying non-relevant comments during auto-correction. (@Darhazer) - #9312: Fix
Layout/FirstHashElementLineBreakto apply to multi-line hashes with only a single element. (@muirdm) - #9316: Fix
Style/EmptyLiteralregistering wrong offense when using a numbered block for Hash.new, i.e.Hash.new { _1[_2] = [] }. (@agargiulo) - #9308: Fix an error for
Layout/EmptyLineBetweenDefswhen using endless class method. (@koic) - #9314: Fix an incorrect auto-correct for
Style/RedundantReturnwhen multiple return values have a parenthesized return value. (@koic) - #9335: Fix an incorrect auto-correct for
EnforcedStyle: require_parenthesesofStyle/MethodCallWithArgsParentheseswithStyle/NestedParenthesizedCalls. (@koic) - #9290: Fix a false positive for
Layout/SpaceBeforeBracketswhen using array literal method argument. (@koic) - #9333: Fix an error for
Style/IfInsideElsewhen using a modifierifnested inside anelseafterelsif. (@koic) - #9303: Fix an incorrect auto-correct for
Style/RaiseArgswithEnforcedStyle: compactwhen using exception instantiation argument. (@koic)
Changes
- #9300: Make
Lint/NonDeterministicRequireOrdernot to register offense when using Ruby 3.0 or higher. (@koic) - #9320: Support unicode-display_width v2. (@dduugg)
- #9288: Require Parser 3.0.0.0 or higher. (@koic)
- #9337: Add
AllowedIdentifierstoNaming/VariableName. (@dvandersluis) - #9295: Update
Style/SingleLineMethodsto correct to an endless method definition if they are allowed. (@dvandersluis) - #9331: Mark
Style/MutableConstantas unsafe. (@koic)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.7
New features
- #9260: Support auto-correction for
Style/MultilineMethodSignature. (@koic) - #9282: Make
Style/RedundantFreezeandStyle/MutableConstantcops aware of frozen regexp and range literals when using Ruby 3.0. (@koic) - #9223: Add new
Lint/AmbiguousAssignmentcop. (@fatkodima) - #9243: Support auto-correction for
Style/CommentedKeyword. (@koic) - #9283: Add new
Style/HashExceptcop. (@koic) - #9231: Add new
Layout/SpaceBeforeBracketscop. (@koic)
Bug fixes
- #9232: Fix
Style/SymbolProcregistering wrong offense when using a symbol numbered block argument greater than 1, i.e.[[1, 2]].map { _2.succ }. (@tdeo) - #9274: Fix error in
Metrics/ClassLengthwhen the class only contains comments. (@dvandersluis) - #9213: Fix a false positive for
Style/RedanduntFreezewhen usingArray#*. (@koic) - #9279: Add support for endless methods to
Style/MethodCallWithArgsParentheses. (@dvandersluis) - #9245: Fix
Lint/AmbiguousRegexpLiteralwhen given amatch_with_lvasgnnode. (@dvandersluis) - #9276: Add support for endless methods to
Style/SingleLineMethods. (@dvandersluis) - #9225: Fix Style/LambdaCall ignoring further offenses after opposite style is detected. (@sswander)
- #9234: Fix the error for
Style/KeywordParametersOrderand make it aware of block keyword parameters. (@koic) - #8938: Fix some ConfigurableEnforcedStyle cops to output
Excludefile lists in--auto-gen-configruns. (@h-lame) - #9257: Fix false positive for
Style/SymbolProcwhen the block uses a variable from outside the block. (@dvandersluis) - #9251: Fix extracted cop warning when the extension is loaded using
--require. (@dvandersluis) - #9244: When a cop defined in an extension is explicitly enabled, ensure that it remains enabled. (@dvandersluis)
- #8046: Fix an error for
Layout/HeredocArgumentClosingParenthesiswhen there is an argument between a heredoc argument and the closing paretheses. (@koic) - #9261: Fix an incorrect auto-correct for
Style/MultilineWhenThenwhen one line for multiple condidate values ofwhenstatement. (@makicamel) - #9258: Fix calculation of cop department for nested departments. (@mvz)
- #9277: Fix
Layout/EmptyLineBetweenDefserror with endless method definitions. (@dvandersluis) - #9278: Update
Style/MethodDefParenthesesto ignore endless method definitions since parentheses are always required. (@dvandersluis)
Changes
- #9212: Make
Style/RedundantArgumentaware ofString#chompandString#chomp!. (@koic) - #8482: Allow simple math for
Lint/BinaryOperatorWithIdenticalOperandscop. (@fatkodima) - #9237: Add
IgnoredPatternsconfiguration toLint/UnreachableLoopto allow for block methods that share a name with anEnumerablemethod. (@dvandersluis) - #9206: Allow extensions to disable cop obsoletions. (@dvandersluis)
- #9262: Update
Style/CollectionMethodsto be handle additional arguments and methods that accept a symbol instead of a block. (@dvandersluis) - #9235: Allow
--onlyand--exceptto be able to properly qualify cops added by require. (@dvandersluis) - #9205: Update
Naming/MemoizedInstanceVariableNameto handle dynamically defined methods. (@dvandersluis) - #9285: Add
AllowPercentLiteralArrayArgumentoption forLint/RedundantSplatExpansionto enable the option by default. (@koic) - #9208: Use Array#bsearch instead of Array#include? to detect hidden files. (@dark-panda)
- #9228: Suppress any config warnings for
rubocop -V. (@dvandersluis) - #9193: Add
IgnoreLiteralBranchesandIgnoreConstantBranchesoptions toLint/DuplicateBranch. (@dvandersluis)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.6.1
Bug fixes
- #9196: Fix
ConfigObsoletion::ExtractedCopraising errors for loaded features when bundler is not activated. (@dvandersluis)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.6
New features
- #9125: Allow ConfigObsoletion to be extended by other RuboCop libraries. (@dvandersluis)
- #9182: Support auto-correction for
Style/RedundantArgument. (@koic) - #9186: Support auto-correction for
Style/FloatDivision. (@koic) - #9167: Support auto-correct for
StyleSingleLineBlockParams. (@koic)
Bug fixes
- #9177: Remove back-ref related code from
Style/SpecialGlobalVars. (@r7kamura) - #9160: Fix an incorrect auto-correct for
Style/IfUnlessModifierandStyle/SoleNestedConditionalwhen auto-correction conflicts for guard condition. (@koic) - #9174: Handle send nodes with unparenthesized arguments in
Style/SoleNestedConditional. (@dvandersluis) - #9184:
Layout/EmptyLinesAroundAttributeAccessorfails if the attr_accessor is the last line of the file. (@tas50)
Changes
- #9171: Add "did you mean" message when failing due to invalid cops in configuration. (@dvandersluis)
- #8897: Change
Style/StringConcatenationto accept line-end concatenation between two strings so thatStyle/LineEndConcatenationcan handle it instead. (@dvandersluis) - #9172: Add
Style/PerlBackrefstargets and change message more detailed. (@r7kamura) - #9187: Update formatters to output
[Correctable]for correctable offenses. (@dvandersluis) - #9169: Add obsoletion warnings for
Performance/*andRails/*which are in separate gems now. (@dvandersluis)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.5.2
Bug fixes
- #9152: Fix an incorrect auto-correct for
Style/SoleNestedConditionalwhen nested||operator modifier condition. (@koic) - #9161: Fix a false positive for
Layout/HeredocArgumentClosingParenthesiswhen using subsequence closing parentheses in the same line. (@koic) - #9151: Fix
SuggestExtensionsto not suggest extensions that are installed but not direct dependencies. (@dvandersluis) - #8985: Fix
Style/StringConcatenationautocorrect generating invalid ruby. (@tejasbubane) - #9155: Fix a false positive for
Layout/MultilineMethodCallIndentationwhen multiline method chain has expected indent width and the method is preceded by splat forEnforcedStyle: indented_relative_to_receiver. (@koic)
Changes
- #9080: Make
Lint/ShadowingOuterVariableaware ofRactor. (@tejasbubane) - #9102: Relax regexp_parser requirement. (@marcandre)
- Ruby
Published by bbatsov about 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.5.1
Bug fixes
- #8684: Fix an error for
Lint/InterpolationCheckcop. (@tejasbubane) - #9145: Fix issues with SuggestExtensions when bundler is not available, or when there is no gemfile. (@dvandersluis)
- #9140: Fix an error for
Layout/EmptyLinesAroundArgumentswhen multiline style argument for method call without selector. (@koic) - #9136: Fix
AllowedIdentifiersinNaming/VariableNumberto include variable assignments. (@PhilCoggins)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.5.0
New features
- #9112: Add new cop
Lint/UnexpectedBlockArity. (@dvandersluis) - #9010:
Metrics/ParameterListssupportsMaxOptionalParametersconfig parameter. (@fatkodima) - #9114: Support auto-correction for
Style/SoleNestedConditional. (@koic) - #8564:
Metrics/AbcSize: Add optional discount for repeated "attributes". (@marcandre)
Bug fixes
- #8820: Fixes
IfWithSemicolonautocorrection whenelsifis present. (@adrian-rivera, @dvandersluis) - #9113: Fix a false positive for
Style/MethodCallWithoutArgsParentheseswhen assigning to a default argument with the same name. (@koic) - #9115: Fix a false positive for
Style/FirstArgumentIndentationwhen argument has expected indent width and the method is preceded by splat forEnforcedStyle: consistent_relative_to_receiver. (@koic) - #9128: Fix an incorrect auto-correct for
Style/ClassAndModuleChildrenwhen namespace is defined as a class in the same file. (@koic) - #9105: Fix an incorrect auto-correct for
Style/RedundantConditionwhen using operator method inelse. (@koic) - #9096: Fix #9095 use merged_config instead of config for pending new cop check. (@ThomasKoppensteiner)
- #8053: Fix an incorrect auto-correct for
Style/AndOrwhenorprecedesand. (@koic) - #9097: Fix a false positive for
Layout/EmptyLinesAroundArgumentswhen blank line is inserted between method with arguments and receiver. (@koic)
Changes
- #9122: Added tip message if any gems are loaded that have RuboCop extensions. (@dvandersluis)
- #9104: Preset some stdlib method names for
Naming/VariableNumber. (@koic) - #9127: Update
Style/SymbolProcto be aware of numblocks. (@dvandersluis) - #9102: Upgrade regexp_parser to 2.0. (@knu)
- #9100: Update
ConfigObsoletionso that parameters can be deprecated but still accepted. (@dvandersluis) - #9108: Update
Lint/UnmodifiedReduceAccumulatorto handle numblocks and more than 2 arguments. (@dvandersluis) - #9098: Update
Metrics/BlockLengthandMetrics/MethodLengthto useIgnoredMethodsinstead ofExcludedMethodsin configuration. The previous key is retained for backwards compatibility. (@dvandersluis) - #9098: Update
IgnoredMethodsso that every cop that uses it will accept both strings and regexes in the configuration. (@dvandersluis)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.4.2
Bug fixes
- #9083: Fix
Style/RedundantArgumentcop raising offense for more than one argument. (@tejasbubane) - #9089: Fix an incorrect auto-correct for
Style/FormatStringwhen using springf with second argument that uses an operator. (@koic) - #7670: Handle offenses inside heredocs for
-a --disable-uncorrectable. (@jonas054) - #9070: Fix
Lint/UnmodifiedReduceAccumulatorerror when the block does not have enough arguments. (@dvandersluis)
Changes
- #9091: Have
Naming/VariableNumberaccept _1, _2, ... (@marcandre) - #9087: Deprecate
EnforceSuperclassmodule. (@koic)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.4.1
Bug fixes
- Ruby
Published by koic over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.4.0
New features
- #7737: Add new
Style/RedundantArgumentcop. (@tejasbubane) - #9064: Add
EmptyLineBetweenMethodDefs,EmptyLineBetweenClassDefsandEmptyLineBetweenModuleDefsconfig options forLayout/EmptyLineBetweenDefscop. (@tejasbubane) - #9043: Add
--stderrto write all output to stderr except for the autocorrected source. (@knu)
Bug fixes
- #9067: Fix an incorrect auto-correct for
Lint::AmbiguousRegexpLiteralwhen passing in a regexp to a method with no receiver. (@amatsuda) - #9060: Fix an error for
Layout/SpaceAroundMethodCallOperatorwhen using__ENCODING__. (@koic) - #7338: Handle assignment with
[]=inMultilineMethodCallIndentation. (@jonas054) - #7726: Fix
MultilineMethodCallIndentationindentation inside square brackets. (@jonas054) - #8857: Improve how
Excludeproperties are generated by--auto-gen-config. (@jonas054)
Changes
- #8788: Change
Style/Documentationto not trigger offense with only macros. (@tejasbubane) - #8993: Allow
ExcludedMethodsconfig ofMetrics/MethodLengthcop to contain regex. (@tejasbubane) - #9073: Enable
Layout/LineLength's auto-correct by default. (@bbatsov) - #9079: Improve the gemspec to load only the necessary files without the git utility. (@piotrmurach)
- #9059: Update
Lint/UnmodifiedReduceAccumulatorto accept blocks which return in the formaccumulator[element]. (@dvandersluis) - #9072:
Lint/MissingSuper: excludemethod_missingandrespond_to_missing?. (@marcandre) - #9074: Allow specifying a pull request ID when calling
rake changelog:*.(@marcandre)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.3.1
Bug fixes
- #9037: Fix
required_ruby_versionissue when usingGem::Requirement. (@cetinajero) - #9039: Fix stack level too deep error if target directory contains
**. (@unasuke) - #6962: Limit
Layout/ClassStructureconstant order autocorrect to literal constants. (@tejasbubane) - #9032: Fix an error for
Style/DocumentDynamicEvalDefinitionwhen using eval-type method with interpolated string that is not heredoc without comment doc. (@koic) - #9049: Have
Lint/ToEnumArgumentsaccept__callee__. (@marcandre) - #9050: Fix a false positive for
Style/NegatedIfElseConditionwhenifwith!!condition. (@koic) - #9041: Fix a false positive for
Naming/VariableNumberwhen using integer symbols. (@koic)
Changes
- #9045: Have
cut_releasehandle "config/default" and generate cops doc. (@marcandre) - #9036: Allow
enumsmethod by default forLint/ConstantDefinitionInBlock. (@koic) - #9035: Only complain about
SafeYAMLif it causes issues. (@marcandre)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.3
New features
- #8761: Read
required_ruby_versionfrom gemspec file if it exists. (@HeroProtagonist) - #9001: Add new
Lint/EmptyClasscop. (@fatkodima) - #9025: Add
AllowedMethodsoption toLint/ConstantDefinitionInBlock. (@koic) - #9014: Support auto-correction for
Style/IfInsideElse. (@koic) - #8483: Add new
Style/StaticClasscop. (@fatkodima) - #9020: Add new
Style/NilLambdacop to check for lambdas that always return nil. (@dvandersluis) - #8404: Add new
Lint/DuplicateBranchcop. (@fatkodima)
Bug fixes
- #8499: Fix
Style/IfUnlessModifierandStyle/WhileUntilModifierto prevent an offense if there are both first-line comment and code afterendblock. (@dsavochkin) - #8996: Fix a false positive for
Style/MultipleComparisonwhen comparing two sides of the disjunction is unrelated. (@koic) - #8975: Fix an infinite loop when autocorrecting
Layout/TrailingWhitespace+Lint/LiteralInInterpolation. (@fatkodima) - #8998: Fix an error for
Style/NegatedIfElseConditionwhen using negated condition andifbranch body is empty. (@koic) - #9008: Mark
Style/InfiniteLoopas unsafe. (@marcandre)
Changes
- #8978: Update
Layout/LineLengthautocorrection to be able to handle method calls with long argument lists. (@dvandersluis) - #9015: Update
Lint/EmptyBlockto allow for empty lambdas. (@dvandersluis) - #9022: Add
NOTEto keywords ofStyle/CommentAnnotation. (@koic) - #9011: Mark autocorrection for
Lint/Loopas unsafe. (@dvandersluis) - #9026: Update
Style/DocumentDynamicEvalDefinitionto detect comment blocks that document the evaluation. (@dvandersluis) - #9004: Remove obsolete gem
SafeYAMLcompatibility. (@marcandre) - #9023: Mark unsafe for
Style/CollectionCompact. (@koic) - #9012: Allow
AllowedIdentifiersto be specified forNaming/VariableNumber. (@dvandersluis)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.2
New features
- #8983: Support auto-correction for
Naming/HeredocDelimiterCase. (@koic) - #8004: Add new
GitHubActionsFormatterformatter. (@lautis) - #8175: Add new
AllowedCompactTypesoption forStyle/RaiseArgs. (@pdobb) - #8566: Add new
Style/CollectionCompactcop. (@fatkodima) - #8925: Add
--display-timeoption for displaying elapsed time ofrubocopcommand. (@joshuapinter) - #8967: Add new
Style/NegatedIfElseConditioncop. (@fatkodima) - #8984: Support auto-correction for
Style/DoubleNegation. (@koic) - #8992: Support auto-correction for
Lint/ElseLayout. (@koic) - #8988: Support auto-correction for
Lint/UselessSetterCall. (@koic) - #8982: Support auto-correction for
Naming/BinaryOperatorParameterName. (@koic)
Bug fixes
- #8989: Fix multibyte support in the regexp node handler that led
Style/RedundantRegexpEscapeto malfunction and corrupt a program in auto-correction. (@knu) - #8912: Fix
Layout/ElseAlignmentforrescue/else/ensureinsidedo/endblocks with assignment. (@miry) - #8971: Fix a false alarm for
# rubocop:disable Lint/EmptyBlockinline comment withLint/RedundantCopDisableDirective. (@koic) - #8976: Fix an incorrect auto-correct for
Style/KeywordParametersOrderwhen whenkwoptargis beforekwargand argument parentheses omitted. (@koic) - #8084: Fix a bug in how
Layout/SpaceAroundBlockParametershandles block parameters with a trailing comma. (@bquorning) - #8966: Fix
Layout/SpaceInsideParensto enforce no spaces in empty parens for all styles. (@joshuapinter)
Changes
- #5717: Support
defined?-based memoization forNaming/MemoizedInstanceVariableNamecop. (@fatkodima) - #8964: Extend
Naming/VariableNumbercop to handle method names and symbols. (@fatkodima)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.1
New features
- #8896: Add new
Lint/DuplicateRegexpCharacterClassElementcop. (@owst) - #8895: Add new
Lint/EmptyBlockcop. (@fatkodima) - #8934: Add new
Style/SwapValuescop. (@fatkodima) - #7549: Add new
Style/ArgumentsForwardingcop. (@koic) - #8859: Add new
Lint/UnmodifiedReduceAccumulatorcop. (@dvandersluis) - #8951: Support auto-correction for
Style/MultipleComparison. (@koic) - #8953: Add
AllowMethodComparisonoption forLint/MultipleComparison. (@koic) - #8960: Add
Regexp::Expression#locand#expressionto replaceparsed_tree_expr_loc. (@marcandre) - #8930: Add rake tasks for alternative way to specify Changelog entries. (@marcandre)
- #8940: Add new
Style/DocumentDynamicEvalDefinitioncop. (@fatkodima) - #7753: Add new
Lint/ToEnumArgumentscop. (@fatkodima)
Bug fixes
- #8921: Prevent
Lint/LiteralInInterpolationfrom removing necessary interpolation in%W[]and%I[]literals. (@knu) - #8708: Fix bad regexp recognition in
Lint/OutOfRangeRegexpRefwhen there are multiple regexps. (@dvandersluis) - #8945: Fix changelog task to build a correct changelog item when
Fix #123is encountered. (@dvandersluis) - #8914: Fix autocorrection for
Layout/TrailingWhitespacein heredocs. (@marcandre) - #8913: Fix an incorrect auto-correct for
Style/RedundantRegexpCharacterClassdue to quantifier. (@ysakasin) - #8917: Fix rubocop comment directives handling of cops with multiple levels in department name. (@fatkodima)
- #8918: Fix a false positives for
Bundler/DuplicatedGemwhen a gem conditionally duplicated withinif-elsiforcase-whenstatements. (@fatkodima) - #8933: Fix an error for
Layout/EmptyLinesAroundAccessModifierwhen the first line is a comment. (@matthieugendreau) - #8954: Fix autocorrection for Style/RedundantRegexpCharacterClass with %r. (@ysakasin)
Changes
- #8920: Remove Capybara's
save_screenshotfromLint/Debugger. (@ybiquitous) - #8919: Require RuboCop AST 1.0.1 or higher. (@koic)
- #8939: Accept comparisons of multiple method calls for
Style/MultipleComparison. (@koic) - #8950: Add
IgnoredMethodsandIgnoredClassestoLint/NumberConversion. (@dvandersluis)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 1.0
The first stable RuboCop release ever is finally here! You can read more about this special release here.
New features
- #7944: Add
MaxUnannotatedPlaceholdersAllowedoption toStyle/FormatStringTokencop. (@Tietew) - #8379: Handle redundant parentheses around an interpolated expression for
Style/RedundantParenthesescop. (@fatkodima)
Bug fixes
- #8892: Fix an error for
Style/StringConcatenationwhen correcting nested concatenable parts. (@fatkodima) - #8781: Fix handling of comments in
Style/SafeNavigationautocorrection. (@dvandersluis) - #8907: Fix an incorrect auto-correct for
Layout/ClassStructurewhen heredoc constant is defined after public method. (@koic) - #8889: Cops can use new
after_<type>callbacks (only for nodes that may have children nodes, like:sendand unlike:sym). (@marcandre) - #8906: Fix a false positive for
Layout/SpaceAroundOperatorswhen upward alignment. (@koic) - #8585: Fix false positive in
Style/RedundantSelfcop with nestedselfaccess. (@marcotc)
Changes
- #8882: (Potentially breaking) RuboCop assumes that Cop classes do not define new
on_<type>methods at runtime (e.g. viaextendininitialize). (@marcandre) - #7966: (Breaking) Enable all pending cops for RuboCop 1.0. (@koic)
- #8490: (Breaking) Change logic for cop department name computation. Cops inside deep namespaces (5 or more levels deep) now belong to departments with names that are calculated by joining module names starting from the third one with slashes as separators. For example, cop
Rubocop::Cop::Foo::Bar::Baznow belongs toFoo/Bardepartment (previously it wasBar). (@dsavochkin) - #8692: Default changed to disallow
Layout/TrailingWhitespacein heredoc. (@marcandre) - #8894: Make
Security/Openaware ofURI.open. (@koic) - #8901: Fix false positive for
Naming/BinaryOperatorParameterNamewhen defining=~. (@zajn) - #8908: Show extension cop versions when using
--verbose-versionoption. (@koic)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.93.1
Bug fixes
- #8782: Fix incorrect autocorrection for
Style/TernaryParentheseswithdefined?. (@dvandersluis) - #8867: Rework
Lint/RedundantSafeNavigationto be more safe. (@fatkodima) - #8864: Fix false positive for
Style/RedundantBeginwith a postfixwhileoruntil. (@dvandersluis) - #8869: Fix a false positive for
Style/RedundantBeginwhen usingbeginfor or assignment and method call. (@koic) - #8862: Fix an error for
Lint/AmbiguousRegexpLiteralwhen using regexp without method calls in nested structure. (@koic) - #8872: Fix an error for
Metrics/ClassLengthwhen multiple assignments to constants. (@koic) - #8871: Fix a false positive for
Style/RedundantBeginwhen usingbeginfor method argument or part of conditions. (@koic) - #8875: Fix an incorrect auto-correct for
Style/ClassEqualityComparisonwhen comparing class name. (@koic) - #8880: Fix an error for
Style/ClassLengthwhen overlapping constant assignments. (@koic)
- Ruby
Published by koic over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.93
New features
- #8796: Add new
Lint/HashCompareByIdentitycop. (@fatkodima) - #8833: Add new
Style/ClassEqualityComparisoncop. (@fatkodima) - #8668: Add new
Lint/RedundantSafeNavigationcop. (@fatkodima) - #8842: Add notification about cache being used to debug mode. (@hatkyinc2)
- #8822: Make
Style/RedundantBeginaware ofbeginwithoutrescueorensure. (@koic)
Bug fixes
- #8810: Fix multiple offense detection for
Style/RaiseArgs. (@pbernays) - #8151: Fix a false positive for
Lint/BooleanSymbolwhen used within%i[...]. (@fatkodima) - #8809: Fix multiple offense detection for
Style/For. (@pbernays) - #8801: Fix
Layout/SpaceAroundEqualsInParameterDefaultonly registered once in a line. (@rdunlop) - #8514: Correct multiple
Style/MethodDefParenthesesper file. (@rdunlop) - #8825: Fix crash in
Style/ExplicitBlockArgumentwhen code is called outside of a method. (@ghiculescu) - #8718: Fix undefined methods of pseudo location. (@ybiquitous)
- #8354: Detect regexp named captures in
Style/CaseLikeIfcop. (@dsavochkin) - #8821: Fix an incorrect autocorrect for
Style/NestedTernaryOperatorwhen using a nested ternary operator expression with no parentheses on the outside. (@koic) - #8834: Fix a false positive for
Style/ParenthesesAsGroupedExpressionwhen method argument parentheses are omitted and hash argument key is enclosed in parentheses. (@koic) - #8830: Fix bad autocorrect of
Style/StringConcatenationwhen string includes double quotes. (@tleish) - #8807: Fix a false positive for
Style/RedundantConditionwhen using assignment by hash key access. (@koic) - #8848: Fix a false positive for
Style/CombinableLoopswhen using the same method with different arguments. (@dvandersluis) - #8843: Fix an incorrect autocorrect for
Lint/AmbiguousRegexpLiteralwhen sending method to regexp literal receiver. (@koic) - #8842: Save actual status to cache, except corrected. (@hatkyinc2)
- #8835: Fix an incorrect autocorrect for
Style/RedundantInterpolationwhen using string interpolation for non-operator methods. (@koic) - #7495: Example for
Lint/AmbiguousBlockAssociationcop. (@AllanSiqueira) - #8855: Fix an error for
Layout/EmptyLinesAroundAccessModifierandStyle/AccessModifierDeclarationswhen using only access modifier. (@koic)
Changes
- #8803: (Breaking)
RegexpNode#parsed_treenow processes regexps including interpolation (by blanking the interpolation before parsing, rather than skipping). (@owst) - #8625: Improve
Style/RedundantRegexpCharacterClassandStyle/RedundantRegexpEscapeby usingregexp_parsergem. (@owst) - #8646: Faster find of all files in
TargetFinderclass which improves initial startup speed. (@tleish) - #8102: Consider class length instead of block length for
Struct.new. (@tejasbubane) - #7408: Make
Gemspec/RequiredRubyVersioncop aware ofGem::Requirement. (@tejasbubane)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.92
New features
- #8778: Add command line option
--regenerate-todo. (@dvandersluis) - #8790: Add
AllowedMethodsoption toStyle/OptionalBooleanParametercop. (@fatkodima) - #8738: Add autocorrection to
Style/DateTime. (@dvandersluis)
Bug fixes
- #8774: Fix a false positive for
Layout/ArrayAlignmentwith parallel assignment. (@dvandersluis)
Changes
- #8785: Update TargetRubyVersion 2.8 to 3.0 (experimental). (@koic)
- #8650: Faster find of hidden files in
TargetFinderclass which improves rubocop initial startup speed. (@tleish) - #8783: Disable
Style/ArrayCoercioncop by default. (@koic)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.91.1
Bug fixes
- #8720: Fix an error for
Lint/IdentityComparisonwhen callingobject_idmethod without receiver in LHS or RHS. (@koic) - #8767: Fix a false positive for
Style/RedundantReturnwhen a rescue has an else clause. (@fatkodima) - #8710: Fix a false positive for
Layout/RescueEnsureAlignmentwhenLayout/BeginEndAlignmentcop is not enabled status. (@koic) - #8726: Fix a false positive for
Naming/VariableNumberwhen naming multibyte character variable name. (@koic) - #8730: Fix an error for
Lint/UselessTimeswhen there is a blank line in the method definition. (@koic) - #8740: Fix a false positive for
Style/HashAsLastArrayItemwhen the hash is in an implicit array. (@dvandersluis) - #8739: Fix an error for
Lint/UselessTimeswhen using empty block argument. (@koic) - #8742: Fix some assignment counts for
Metrics/AbcSize. (@marcandre) - #8750: Fix an incorrect auto-correct for
Style/MultilineWhenThenwhen line break for multiple condidate values ofwhenstatement. (@koic) - #8754: Fix an error for
Style/RandomWithOffsetwhen using a range with non-integer bounds. (@eugeneius) - #8756: Fix an infinite loop error for
Layout/EmptyLinesAroundAccessModifierwithLayout/EmptyLinesAroundBlockBodywhen using access modifier with block argument. (@koic) - #8372: Fix
Lint/RedundantCopEnableDirectiveautocorrection to not leave orphaned empty# rubocop:enablecomments. (@dvandersluis) - #8372: Fix
Lint/RedundantCopDisableDirectiveautocorrection. (@dvandersluis) - #8764: Fix
Layout/CaseIndentationnot showing the cop name in output messages. (@dvandersluis) - #8771: Fix an error for
Style/OneLineConditionalwhen usingif-then-elsif-then-end. (@koic) - #8576: Fix
Style/IfUnlessModifierto ignore cop disable comment directives when considering conversion to the modifier form. (@dsavochkin)
Changes
- #8489: Exclude method
respond_to_missing?fromOptionalBooleanParametercop. (@em-gazelle) - #7914:
Style/SafeNavigationmarked as having unsafe auto-correction. (@marcandre) - #8749: Disable
Style/IpAddressesby default inGemfileand gemspec files. (@dvandersluis)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.91
New features
- New option
--cache-rootand support for theRUBOCOP_CACHE_ROOTenvironment variable. Both can be used to override theAllCops: CacheRootDirectoryconfig, especially in a CI setting. (@sascha-wolf) - #8582: Add new
Layout/BeginEndAlignmentcop. (@koic) - #8699: Add new
Lint/IdentityComparisoncop. (@koic) - Add new
Lint/UselessTimescop. (@dvandersluis) - #8707: Add new
Lint/ConstantDefinitionInBlockcop. (@eugeneius)
Bug fixes
- #8627: Fix a false positive for
Lint/DuplicateRequirewhen same feature argument but different require method. (@koic) - #8674: Fix an error for
Layout/EmptyLineAfterMultilineConditionwhen conditional is at the top level. (@fatkodima) - #8658: Fix a false positive for
Style/RedundantSelfAssignmentwhen calling coercion methods. (@fatkodima) - #8669: Fix an offense creation for
Lint/EmptyFile. (@fatkodima) - #8607: Fix a false positive for
Lint/UnreachableLoopwhen conditional branch includes continue statement preceding break statement. (@fatkodima) - #8572: Fix a false positive for
Style/RedundantParentheseswhen parentheses are used like method argument parentheses. (@koic) - #8630: Fix some false positives for
Style/HashTransformKeysandStyle/HashTransformValueswhen the receiver is an array. (@eugeneius) - #8653: Fix a false positive for
Layout/DefEndAlignmentwhen using refinements andprivate def. (@koic) - #8655: Fix a false positive for
Style/ClassAndModuleChildrenwhen using cbase class name. (@koic) - #8654: Fix a false positive for
Style/SafeNavigationwhen checkingfoo&.empty?in a conditional. (@koic) - #8660: Fix a false positive for
Style/ClassAndModuleChildrenwhen using cbase module name. (@koic) - #8664: Fix a false positive for
Naming/BinaryOperatorParameterNamewhen naming multibyte character method name. (@koic) - #8604: Fix a false positive for
Bundler/DuplicatedGemwhen gem is duplciated in condition. (@tejasbubane) - #8671: Fix an error for
Style/ExplicitBlockArgumentwhen using safe navigation method call. (@koic) - #8681: Fix an error for
Style/HashAsLastArrayItemwithno_bracesfor empty hash. (@fsateler) - #8682: Fix a positive for
Style/HashTransformKeysandStyle/HashTransformValueswhen theeach_with_objecthash is used in the transformed key or value. (@eugeneius) - #8688: Mark
Style/GlobalStdStreamas unsafe autocorrection. (@marcandre) - #8642: Fix a false negative for
Style/SpaceInsideHashLiteralBraceswhen a correct empty hash precedes the incorrect hash. (@dvandersluis) - #8683: Make naming cops work with non-ascii characters. (@tejasbubane)
- #8626: Fix false negatives for
Lint/UselessMethodDefinition. (@marcandre) - #8698: Fix cache to avoid encoding exception. (@marcandre)
- #8704: Fix an error for
Lint/AmbiguousOperatorwhen using safe navigation operator with a unary operator. (@koic) - #8661: Fix an incorrect auto-correct for
Style/MultilineTernaryOperatorwhen returning a multiline ternary operator expression. (@koic) - #8526: Fix a false positive for
Style/CaseEqualitycop when the receiver is not a camel cased constant. (@koic) - #8673: Fix the JSON parse error when specifying
--format=jsonand--stdinoptions. (@koic)
Changes
- #8470: Do not autocorrect
Style/StringConcatenationwhen parts of the expression are too complex. (@dvandersluis) - #8561: Fix
Lint/UselessMethodDefinitionto not register an offense when method definition includes optional arguments. (@fatkodima) - #8617: Fix
Style/HashAsLastArrayItemto not register an offense when all items in an array are hashes. (@dvandersluis) - #8500: Add
in?to AllowedMethods forLint/SafeNavigationChaincop. (@tejasbubane) - #8629: Fix the cache being reusable in CI by using crc32 to calculate file hashes rather than
mtime, which changes each CI build. (@dvandersluis) - #8663: Fix multiple autocorrection bugs with
Style/ClassMethodsDefinitions. (@dvandersluis) - #8621: Add helpful Infinite Loop error message. (@iSarCasm)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.90
New features
- #8451: Add new
Style/RedundantSelfAssignmentcop. (@fatkodima) - #8384: Add new
Layout/EmptyLineAfterMultilineConditioncop. (@fatkodima) - #8390: Add new
Style/SoleNestedConditionalcop. (@fatkodima) - #8562: Add new
Style/KeywordParametersOrdercop. (@fatkodima) - #8486: Add new
Style/CombinableLoopscop. (@fatkodima) - #8381: Add new
Style/ClassMethodsDefinitionscop. (@fatkodima) - #8474: Add new
Lint/DuplicateRequirecop. (@fatkodima) - #8472: Add new
Lint/UselessMethodDefinitioncop. (@fatkodima) - #8531: Add new
Lint/EmptyFilecop. (@fatkodima) - Add new
Lint/TrailingCommaInAttributeDeclarationcop. (@drenmi) - #8578: Add
:restore_registrycontext andstub_cop_classhelper class. (@marcandre) - #8579: Add
Cop.documentation_url. (@marcandre) - #8510: Add
RegexpNode#each_captureandparsed_tree. (@marcandre) - #8365: Cops defining
on_sendcan be optimized by defining the constantRESTRICT_ON_SENDwith a list of acceptable method names. (@marcandre)
Bug fixes
- #8508: Fix a false positive for
Style/CaseLikeIfwhen conditional contains comparison with a class. MarkStyle/CaseLikeIfas not safe. (@fatkodima) - #8618: Fix an infinite loop error for
Layout/EmptyLineBetweenDefs. (@fatkodima) - #8534: Fix
Lint/BinaryOperatorWithIdenticalOperandsfor binary operators used as unary operators. (@marcandre) - #8537: Allow a trailing comment as a description comment for
Bundler/GemComment. (@pocke) - #8507: Fix
Style/RescueModifierto handle parentheses around rescue modifiers. (@dsavochkin) - #8527: Prevent an incorrect auto-correction for
Style/CaseEqualitycop when comparing with===against a regular expression receiver. (@koic) - #8524: Fix
Layout/EmptyLinesAroundClassBodyandLayout/EmptyLinesAroundModuleBodyto correctly handle an access modifier as a first child. (@dsavochkin) - #8518: Fix
Lint/ConstantResolutioncop reporting offense formoduleandclassdefinitions. (@tejasbubane) - #8158: Fix
Style/MultilineWhenThencop to correctly handle cases with multiline body. (@dsavochkin) - #7705: Fix
Style/OneLineConditionalcop to handle if/then/elsif/then/else/end cases. AddAlwaysCorrectToMultilineconfig option to this cop to always convert offenses to the multi-line form (false by default). (@Lykos, @dsavochkin) - #8590: Fix an error when auto-correcting encoding mismatch file. (@koic)
- #8321: Enable auto-correction for
Layout/{Def}EndAlignment,Lint/EmptyEnsure,Style/ClassAndModuleChildren. (@marcandre) - #8583: Fix
Style/RedundantRegexpEscapefalse positive for line continuations. (@owst) - #8593: Fix
Style/RedundantRegexpCharacterClassfalse positive for interpolated multi-line expressions. (@owst) - #8624: Fix an error with the
Style/CaseLikeIfcop where it does not properly handle overridden equality methods with no arguments. (@Skipants)
Changes
- #8413: Pending cops warning now contains snippet that can be directly copied into
.rubocop.ymlas well as a notice aboutNewCops: enableconfig option. (@colszowka) - #8362: Add numbers of correctable offenses to summary. (@nguyenquangminh0711)
- #8513: Clarify the ruby warning mentioned in the
Lint/ShadowingOuterLocalVariabledocumentation. (@chocolateboy) - #8517: Make
Style/HashTransformKeysandStyle/HashTransformValuesaware ofto_hwith block. (@eugeneius) - #8529: Mark
Lint/FrozenStringLiteralCommentasSafe, but with unsafe auto-correction. (@marcandre) - #8602: Fix usage of
to_enum(:scan, regexp)to work on TruffleRuby. (@jaimerave)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.89.1
Bug fixes
- #8463: Fix false positives for
Lint/OutOfRangeRegexpRefwhen a regexp is defined and matched in separate steps. (@eugeneius) - #8464: Handle regexps matched with
when,grep,gsub,gsub!,sub,sub!,[],slice,slice!,scan,index,rindex,partition,rpartition,start_with?, andend_with?inLint/OutOfRangeRegexpRef. (@eugeneius) - #8466: Fix a false positive for
Lint/UriRegexpwhen usingregexpmethod without receiver. (@koic) - #8478: Relax
Lint/BinaryOperatorWithIdenticalOperandsfor mathematical operations. (@marcandre) - #8480: Tweak callback list of
Lint/MissingSuper. (@marcandre) - #8481: Fix autocorrect for elements with newlines in
Style/SymbolArrayandStyle/WordArray. (@biinari) - #8475: Fix a false positive for
Style/HashAsLastArrayItemwhen there are duplicate hashes in the array. (@wcmonty) - #8497: Fix
Style/IfUnlessModifierto add parentheses when converting if-end condition inside a parenthesized method argument list. (@dsavochkin)
Changes
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.89
New features
- #8322: Support autocorrect for
Style/CaseEqualitycop. (@fatkodima) - #7876: Enhance
Gemspec/RequiredRubyVersioncop with check thatrequired_ruby_versionis specified. (@fatkodima) - #8291: Add new
Lint/SelfAssignmentcop. (@fatkodima) - #8389: Add new
Lint/DuplicateRescueExceptioncop. (@fatkodima) - #8433: Add new
Lint/BinaryOperatorWithIdenticalOperandscop. (@fatkodima) - #8430: Add new
Lint/UnreachableLoopcop. (@fatkodima) - #8412: Add new
Style/OptionalBooleanParametercop. (@fatkodima) - #8432: Add new
Lint/FloatComparisoncop. (@fatkodima) - #8376: Add new
Lint/MissingSupercop. (@fatkodima) - #8415: Add new
Style/ExplicitBlockArgumentcop. (@fatkodima) - #8383: Support autocorrect for
Lint/Loopcop. (@fatkodima) - #8339: Add
Config#for_badgeas an efficient way to get a cop's config merged with its department's. (@marcandre) - #5067: Add new
Style/StringConcatenationcop. (@fatkodima) - #7425: Add new
Lint/TopLevelReturnWithArgumentcop. (@iamravitejag) - #8417: Add new
Style/GlobalStdStreamcop. (@fatkodima) - #7949: Add new
Style/SingleArgumentDigcop. (@volfgox) - #8341: Add new
Lint/EmptyConditionalBodycop. (@fatkodima) - #7755: Add new
Lint/OutOfRangeRegexpRefcop. (@sonalinavlakhe)
Bug fixes
- #8346: Allow parentheses in single-line inheritance with
Style/MethodCallWithArgsParenthesesEnforcedStyle: omit_parenthesesto fix invalid Ruby auto-correction. (@gsamokovarov) - #8324: Fix crash for
Layout/SpaceAroundMethodCallOperatorwhen usingProc#callshorthand syntax. (@fatkodima) - #8332: Fix auto-correct in
Style/ConditionalAssignmentto preserve constant namespace. (@biinari) - #8344: Fix crash for
Style/CaseLikeIfwhen checking againstequal?andmatch?without a receiver. (@fatkodima) - #8323: Fix a false positive for
Style/HashAsLastArrayItemwhen hash is not a last array item. (@fatkodima) - #8299: Fix an incorrect auto-correct for
Style/RedundantConditionwhen usingraise,rescue, orandwithout argument parentheses inelse. (@koic) - #8335: Fix incorrect character class detection for nested or POSIX bracket character classes in
Style/RedundantRegexpEscape. (@owst) - #8347: Fix an incorrect auto-correct for
EnforcedStyle: hash_rocketsofStyle/HashSyntaxwithLayout/HashAlignment. (@koic) - #8375: Fix an infinite loop error for
Style/EmptyMethod. (@koic) - #8385: Remove auto-correction for
Lint/EnsureReturn. (@marcandre) - #8391: Mark
Style/ArrayCoercionas not safe. (@marcandre) - #8406: Improve
Style/AccessorGrouping's auto-correction to remove redundant blank lines. (@koic) - #8330: Fix a false positive for
Style/MissingRespondToMissingwhen defined method with inline access modifier. (@koic) - #8422: Fix an error for
Lint/SelfAssignmentwhen using or-assignment for constant. (@koic) - #8423: Fix an error for
Style/SingleArgumentDigwhen without a receiver. (@koic) - #8424: Fix an error for
Lint/IneffectiveAccessModifierwhen there isbegin...endbefore a method definition. (@koic) - #8006: Fix line length calculation for
Style/IfUnlessModifierto correctly take into account code before the if condition when considering conversation to a single-line form. (@dsavochkin) - #8283: Fix line length calculation for
Style/IfUnlessModifierto correctly take into account a comment on the first line when considering conversation to a single-line form. (@dsavochkin) - #7957: Fix line length calculation for
Style/IfUnlessModifierto correctly take into account code on the last line after the end keyword when considering conversion to a single-line form. (@dsavochkin) - #8226: Fix
Style/IfUnlessModifierto add parentheses when converting if-end condition inside an array or a hash to a single-line form. (@dsavochkin) - #8443: Fix an incorrect auto-correct for
Style/StructInheritancewhen there is a comment before class declaration. (@koic) - #8444: Fix an error for
Layout/FirstMethodArgumentLineBreakwhen using kwargs insuper. (@koic)
Changes
- #8376:
Style/MethodMissingSupercop is removed in favor of newLint/MissingSupercop. (@fatkodima) - #8433:
Lint/UselessComparisoncop is removed in favor of newLint/BinaryOperatorWithIdenticalOperandscop. (@fatkodima) - #8350: Set default max line length to 120 for
Style/MultilineMethodSignature. (@koic) - #8338: potentially breaking. Config#for_department now returns only the config specified for that department; the 'Enabled' attribute is no longer calculated. (@marcandre)
- #8037: (Breaking) Cop
Metrics/AbcSizenow counts ||=, &&=, multiple assignments, for, yield, iterating blocks.&.now count as conditions too (unless repeated on the same variable). Default bumped from 15 to 17. Consider usingrubocop -a --disable-uncorrectableto ease transition. (@marcandre) - #8276: Cop
Metrics/CyclomaticComplexitynot longer counts&.when repeated on the same variable. (@marcandre) - #8204: (Breaking) Cop
Metrics/PerceivedComplexitynow countselseincasestatements,&.,||=,&&=and blocks known to iterate. Default bumped from 7 to 8. Consider usingrubocop -a --disable-uncorrectableto ease transition. (@marcandre) - #8416: Cop
Lint/InterpolationCheckmarked as unsafe. (@marcandre) - #8442: Remove
RuboCop::Cop::ParserDiagnosticmixin module. (@koic)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.88
New features
- #8279: Recognise require method passed as argument in
Lint/NonDeterministicRequireOrdercop. (@biinari) - #7333: Add new
Style/RedundantFileExtensionInRequirecop. (@fatkodima) - #8316: Support autocorrect for
Lint/DisjunctiveAssignmentInConstructorcop. (@fatkodima) - #8242: Internal profiling available with
bin/rubocop-profileand rake tasks. (@marcandre) - #8295: Add new
Style/ArrayCoercioncop. (@fatkodima) - #8293: Add new
Lint/DuplicateElsifConditioncop. (@fatkodima) - #7736: Add new
Style/CaseLikeIfcop. (@fatkodima) - #4286: Add new
Style/HashAsLastArrayItemcop. (@fatkodima) - #8247: Add new
Style/HashLikeCasecop. (@fatkodima) - #8286: Internal method
expect_offenseallows abbreviated offense messages. (@marcandre)
Bug fixes
- #8232: Fix a false positive for
Layout/EmptyLinesAroundAccessModifierwhenendimmediately after access modifier. (@koic) - #7777: Fix crash for
Layout/MultilineArrayBraceLayoutwhen comment is present after last element. (@shekhar-patil) - #7776: Fix crash for
Layout/MultilineMethodCallBraceLayoutwhen comment is present before closing braces. (@shekhar-patil) - #8282: Fix
Style/IfUnlessModifierbad precedence detection. (@tejasbubane) - #8289: Fix
Style/AccessorGroupingto not register offense for accessor with comment. (@tejasbubane) - #8310: Handle major version requirements in
Gemspec/RequiredRubyVersion. (@eugeneius) - #8315: Fix crash for
Style/PercentLiteralDelimiterswhen the source contains invalid characters. (@eugeneius) - #8239: Don't load
.rubocop.ymlfiles at all outside of the current project, unless they are personal configuration files and the project has no configuration. (@deivid-rodriguez)
Changes
- #8021: Rewrite
Layout/SpaceAroundMethodCallOperatorcop to make it faster. (@fatkodima) - #8294: Add
oftoAllowedNamesofMethodParameterNamecop. (@AlexWayfer)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.87.1
Bug fixes
- #8252: Fix a command line option name from
--safe-autocorrectto--safe-auto-correct, which is compatible with RuboCop 0.86 and lower. (@koic) - #8259: Fix false positives for
Style/BisectedAttrAccessorwhen accessors have different access modifiers. (@fatkodima) - #8253: Fix false positives for
Style/AccessorGroupingwhen accessors have different access modifiers. (@fatkodima) - #8257: Fix an error for
Style/BisectedAttrAccessorwhen usingattr_readerandattr_writerwith splat arguments. (@fatkodima) - #8239: Don't load
.rubocop.ymlfrom personal folders to check for exclusions if given a custom configuration file. (@deivid-rodriguez) - #8256: Fix an error for
--auto-gen-configwhen running a cop who do not support auto-correction. (@koic) - #8262: Fix
Lint/DeprecatedOpenSSLConstantauto-correction ofOpenSSL::Cipherto use lower case, as some Linux-based systems do not accept upper cased cipher names. (@bdewater)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.87
New features
- #7868:
Cop::Baseis the new recommended base class for cops. (@marcandre) - #3983: Add new
Style/AccessorGroupingcop. (@fatkodima) - #8244: Add new
Style/BisectedAttrAccessorcop. (@fatkodima) - #7458: Add new
AsciiConstantsoption forNaming/AsciiIdentifiers. (@fatkodima) - #7373: Add new
Style/RedundantAssignmentcop. (@fatkodima) - #8213: Permit to specify TargetRubyVersion 2.8 (experimental). (@koic)
- #8159: Add new
CountAsOneoption for code length relatedMetriccops. (@fatkodima) - #8164: Support auto-correction for
Lint/InterpolationCheck. (@koic) - #8223: Support auto-correction for
Style/IfUnlessModifierOfIfUnless. (@koic) - #8172: Support auto-correction for
Lint/SafeNavigationWithEmpty. (@koic)
Bug fixes
- #8039: Fix false positives for
Lint/ParenthesesAsGroupedExpressionin when using operators or chain functions. (@CamilleDrapier) - #8196: Fix a false positive for
Style/RedundantFetchBlockwhen using withRails.cache. (@fatkodima) - #8195: Fix an error for
Style/RedundantFetchBlockwhen using#fetchwith empty block. (@koic) - #8193: Fix a false positive for
Style/RedundantRegexpCharacterClasswhen using[\b]. (@owst) - #8205: Fix a false positive for
Style/RedundantRegexpCharacterClasswhen using a leading escaped]. (@owst) - #8208: Fix
Style/RedundantParentheseswith hash literal as first argument toyield. (@karlwithak) - #8176: Don't load
.rubocop.ymlfrom personal folders to check for exclusions if there's a project configuration. (@deivid-rodriguez)
Changes
- #7868: (Breaking) Extensive refactoring of internal classes
Team,Commissioner,Corrector.Cop::Cop#correctionsnot completely compatible. See Upgrade Notes. (@marcandre) - #8156: (Breaking)
rubocop -a / --autocorrectno longer run unsafe corrections;rubocop -A / --autocorrect-allrun both safe and unsafe corrections. Options--safe-autocorrectis deprecated. (@marcandre) - #8207: (Breaking) Order for gems names now disregards underscores and dashes unless
ConsiderPunctuationsetting is set totrue. (@marcandre) - #8211:
Style/ClassVarscop now detectsclass_variable_set. (@biinari) - #8245: Detect top-level constants like
::Constin various cops. (@biinari)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.86
New features
- #8147: Add new
Style/RedundantFetchBlockcop. (@fatkodima) - #8111: Add auto-correct for
Style/StructInheritance. (@tejasbubane) - #8113: Let
expect_offensetemplates add variable-length whitespace with_{foo}. (@eugeneius) - #8148: Support auto-correction for
Style/MultilineTernaryOperator. (@koic) - #8151: Support auto-correction for
Style/NestedTernaryOperator. (@koic) - #8142: Add
Lint/ConstantResolutioncop. (@robotdana) - #8170: Support auto-correction for
Lint/RegexpAsCondition. (@koic) - #8169: Support auto-correction for
Lint/RaiseException. (@koic)
Bug fixes
- #8132: Fix the problem with
Naming/MethodName: EnforcedStyle: camelCaseand_orivariables. (@avrusanov) - #8115: Fix false negative for
Lint::FormatParameterMismatchwhen argument contains formatting. (@andrykonchin) - #8131: Fix false positive for
Style/RedundantRegexpEscapewith escaped delimiters. (@owst) - #8124: Fix a false positive for
Lint/FormatParameterMismatchwhen using named parameters with escaped%. (@koic) - #7979: Fix "uninitialized constant DidYouMean::SpellChecker" exception. (@bquorning)
- #8098: Fix a false positive for
Style/RedundantRegexpCharacterClasswhen using interpolations. (@owst) - #8150: Fix a false positive for
Layout/EmptyLinesAroundAttributeAccessorwhen using attribute accessors inif...elsebranches. (@koic) - #8179: Fix an infinite correction loop error for
Layout/MultilineBlockLayoutwhen missing newline before opening parenthesis(for block body. (@koic) - #8185: Fix a false positive for
Style/YodaConditionwhen interpolation is used on the left hand side. (@koic)
Changes
- #8146: Use UTC in RuboCop todo file generation. (@mauro-oto)
- #8149: Cop
Metrics/CyclomaticComplexitynow counts&.,||=,&&=and blocks known to iterate. Default bumped from 6 to 7. (@marcandre) - #8178: Mark unsafe for
Lint/RaiseException. (@koic)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.85.1
Bug fixes
- #8083: Fix an error for
Lint/MixedRegexpCaptureTypescop when using a regular expression that cannot be processed by regexp_parser gem. (@koic) - #8081: Fix a false positive for
Lint/SuppressedExceptionwhen empty rescue block indoblock. (@koic) - #8096: Fix a false positive for
Lint/SuppressedExceptionwhen empty rescue block in defs. (@koic) - #8108: Fix infinite loop in
Layout/HeredocIndentationauto-correct. (@jonas054) - #8042: Fix raising error in
Lint::FormatParameterMismatchwhen it handles invalid format strings and add new offense. (@andrykonchin)
- Ruby
Published by bbatsov over 5 years ago
https://github.com/rubocop/rubocop - RuboCop 0.85
New features
- #6289: Add new
CheckDefinitionPathHierarchyoption forNaming/FileName. (@jschneid) - #8055: Add new
Style/RedundantRegexpCharacterClasscop. (@owst) - #8069: New option for
expect_offenseto help format offense templates. (@marcandre) - #7908: Add new
Style/RedundantRegexpEscapecop. (@owst) - #7978: Add new option
OnlyForto theBundler/GemCommentcop. (@ric2b) - #8063: Add new
AllowedNamesoption forNaming/ClassAndModuleCamelCase. (@tejasbubane) - #8050: New option
--display-only-failedthat can be used with--format junit. Speeds up test report processing for large codebases and helps address the sorts of concerns raised at mikian/rubocop-junit-formatter #18. (@burnettk) - #7746: Add new
Lint/MixedRegexpCaptureTypescop. (@pocke)
Bug fixes
- #8008: Fix an error for
Lint/SuppressedExceptionwhen empty rescue block indef. (@koic) - #8012: Fix an incorrect autocorrect for
Lint/DeprecatedOpenSSLConstantwhen deprecated OpenSSL constant is used in a block. (@koic) - #8017: Fix a false positive for
Lint/SuppressedExceptionwhen empty rescue with comment indef. (@koic) - #7990: Fix resolving
inherit_gemin remote configs. (@CvX) - #8035: Fix a false positive for
Lint/DeprecatedOpenSSLConstantwhen using double quoted string argument. (@koic) - #7971: Fix an issue where
--disable-uncorrectablewould not update uncorrected code withrubocop:todo. (@rrosenblum) - #8035: Fix a false positive for
Lint/DeprecatedOpenSSLConstantwhen argument is a variable, method, or consntant. (@koic)
Changes
- #8056: (Breaking) Remove support for unindent/active_support/powerpack from
Layout/HeredocIndentation, so it only recommends using squiggy heredoc. (@bquorning)
- Ruby
Published by bbatsov almost 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.84
New features
- #7735:
NodePatternandASTclasses have been moved to therubocop-astgem. (@marcandre) - #7950: Add new
Lint/DeprecatedOpenSSLConstantcop. (@bdewater) - #7976: Add
AllowAliasSyntaxandAllowedMethodsoptions forLayout/EmptyLinesAroundAttributeAccessor. (@koic) - #7984: New
raketask "check_commit" will runrspecandrubocopon files touched by the last commit. (@marcandre)
Bug fixes
- #7953: Fix an error for
Lint/AmbiguousOperatorwhen a method with no arguments is used in advance. (@koic) - #7962: Fix a false positive for
Lint/ParenthesesAsGroupedExpressionwhen heredoc has a space between the same string as the method name and(. (@koic) - #7967:
Style/SlicingWithRangecop now supports any expression as its first index. (@zverok) - #7972: Fix an incorrect autocrrect for
Style/HashSyntaxwhen using a return value usesreturn. (@koic) - #7886: Fix a bug in
AllowCommentslogic inLint/SuppressedException. (@jonas054) - #7991: Fix an error for
Layout/EmptyLinesAroundAttributeAccessorwhen attribute method is method chained. (@koic) - #7993: Fix a false positive for
Migration/DepartmentNamewhen a disable comment contains an unexpected character for department name. (@koic)
Changes
- #7952: (Breaking) Change the max line length of
Layout/LineLengthto 120 by default. (@koic) - #7959: Change enforced style to conditionals for
Style/AndOr. (@koic) - #7985: Add
EnforcedStyleforStyle/DoubleNegationcop and allow double nagation in contexts that use boolean as a return value. (@koic)
- Ruby
Published by bbatsov almost 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.83
New features
- #7951: Include
rakefilefile by default. (@jethrodaniel) - #7921: Add new
Style/SlicingWithRangecop. (@zverok) - #7895: Include
.simplecovfile by default. (@robotdana) - #7916: Support autocorrection for
Lint/AmbiguousRegexpLiteral. (@koic) - #7917: Support autocorrection for
Lint/UselessAccessModifier. (@koic) - #595: Add ERB pre-processing for configuration files. (@jonas054)
- #7918: Support autocorrection for
Lint/AmbiguousOperator. (@koic) - #7937: Support autocorrection for
Style/IfWithSemicolon. (@koic) - #3696: Add
AllowCommentsoption toLint/EmptyWhencop. (@koic) - #7910: Support autocorrection for
Lint/ParenthesesAsGroupedExpression. (@koic) - #7925: Support autocorrection for
Layout/ConditionPosition. (@koic) - #7934: Support autocorrection for
Lint/EnsureReturn. (@koic) - #7922: Add new
Layout/EmptyLineAroundAttributeAccessorcop. (@koic)
Bug fixes
- #7929: Fix
Style/FrozenStringLiteralCommentto accept frozen_string_literal anywhere in leading comment lines. (@jeffcarbs) - #7882: Fix
Style/CaseEqualitywhenAllowOnConstantistrueand the method receiver is implicit. (@rafaelfranca) - #7790: Fix
--paralleland--ignore-parent-exclusioncombination. (@jonas054) - #7881: Fix
--paralleland--force-default-configcombination. (@jonas054) - #7635: Fix a false positive for
Style/MultilineWhenThenwhenthenrequired for a body ofwhenis used. (@koic) - #7905: Fix an error when running
rubocop --onlyorrubocop --exceptoptions without cop name argument. (@koic) - #7903: Fix an incorrect autocorrect for
Style/HashTransformKeysandStyle/HashTransformValuescops when line break beforeto_hmethod. (@diogoosorio, @koic) - #7899: Fix an infinite loop error for
Layout/SpaceAroundOperatorswithLayout/ExtraSpacingwhen usingForceEqualSignAlignment: true. (@koic) - #7885: Fix
Style/IfUnlessModifierlogic when tabs are used for indentation. (@jonas054) - #7909: Fix a false positive for
Lint/ParenthesesAsGroupedExpressionwhen using an intended grouped parentheses. (@koic) - #7913: Fix a false positive for
Lint/LiteralAsConditionwhen usingtrueliteral inwhileand similar cases. (@koic) - #7928: Fix a false message for
Style/GuardClausewhen usingandororoperators for guard clause inthenorelsebranches. (@koic) - #7928: Fix a false positive for
Style/GuardClausewhen assigning the result of a guard condition withelse. (@koic)
Changes
- #7860: Change
AllowInHeredocoption ofLayout/TrailingWhitespacetotrueby default. (@koic) - #7094: Clarify alignment in
Layout/MultilineOperationIndentation. (@jonas054) - #4245: (Breaking) Inspect all files given on command line unless
--only-recognized-file-typesis given. (@jonas054) - #7390: (Breaking) Enabling a cop overrides disabling its department. (@jonas054)
- #7936: Mark
Lint/BooleanSymbolas unsafe. (@laurmurclar) - #7948: Mark unsafe for
Style/OptionalArguments. (@koic) - #7931: Remove dependency on the
jaro_winklergem, instead depending ondid_you_mean. This may be a breaking change for RuboCop libraries callingNameSimilarity#find_similar_name. (@bquorning)
- Ruby
Published by bbatsov almost 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.82
New features
- #7867: Add support for tabs in indentation. (@DracoAter)
- #7863: Corrector now accepts nodes in addition to ranges. (@marcandre)
- #7862: Corrector now has a
wrapmethod. (@marcandre) - #7850: Make it possible to enable/disable pending cops. (@koic)
- #7861: Make it to allow
Style/CaseEqualitywhen the receiver is a constant. (@rafaelfranca) - #7851: Add a new
Style/ExponentialNotationcop. (@tdeo) - #7384: Add new
Style/DisableCopsWithinSourceCodeDirectivecop. (@egze) - #7826: Add new
Layout/SpaceAroundMethodCallOperatorcop. (@saurabhmaurya15)
Bug fixes
- #7871: Fix an auto-correction bug in
Lint/BooleanSymbol. (@knu) - #7842: Fix a false positive for
Lint/RaiseExceptionwhen raising Exception with explicit namespace. (@koic) - #7834: Fix
Lint/UriRegexpto register offense with array arguments. (@tejasbubane) - #7841: Fix an error for
Style/TrailingCommaInBlockArgswhen lambda literal (->) has multiple arguments. (@koic) - #7842: Fix a false positive for
Lint/RaiseExceptionwhen Exception without cbase specified under the namespaceGemby addingAllowedImplicitNamespacesoption. (@koic) Style/IfUnlessModifierdoes not infinite-loop when autocorrecting long lines which use if/unless modifiers and have multiple statements separated by semicolons. (@alexdowad)- rubocop-hq/rubocop-rails#127: Use
ConfigLoader.default_configurationfor the default config. (@hanachin)
Changes
- (Breaking) Renamed
Layout/Tabcop toLayout/IndentationStyle. (@DracoAter) - #7869: (Breaking) Drop support for Ruby 2.3. (@koic)
- Ruby
Published by bbatsov almost 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.81
New features
- #7299: Add new
Lint/RaiseExceptioncop. (@denys281) - #7793: Prefer
include?overmember?inStyle/CollectionMethods. (@dmolesUC) - #7654: Support
with_fixed_indentationoption forLayout/ArrayAlignmentcop. (@nikitasakov) - #7783: Support Ruby 2.7's numbered parameter for
Style/RedundantSort. (@koic) - #7795: Make
Layout/EmptyLineAfterGuardClauseaware of case whereandororis used before keyword that break control (e.g.and return). (@koic) - #7786: Support Ruby 2.7's pattern match for
Layout/ElseAlignmentcop. (@koic) - #7784: Support Ruby 2.7's numbered parameter for
Lint/SafeNavigationChain. (@koic) - #7331: Add
forbiddenoption toStyle/ModuleFunctioncop. (@weh) - #7699: Add new
Lint/StructNewOverridecop. (@ybiquitous) - #7637: Add new
Style/TrailingCommaInBlockArgscop. (@pawptart) - #7809: Add auto-correction for
Style/EndBlockcop. (@tejasbubane) - #7739: Add
IgnoreNotImplementedMethodsconfiguration toLint/UnusedMethodArgument. (@tejasbubane) - #7740: Add
AllowModifiersOnSymbolsconfiguration toStyle/AccessModifierDeclarations. (@tejasbubane) - #7812: Add auto-correction for
Lint/BooleanSymbolcop. (@tejasbubane) - #7823: Add
IgnoredMethodsconfiguration inMetrics/AbcSize,Metrics/CyclomaticComplexity, andMetrics/PerceivedComplexitycops. (@drenmi) - #7816: Support Ruby 2.7's numbered parameter for
Style/Lambda. (@koic) - #7829: Fix an error for
Style/OneLineConditionalwhen one of the branches containsnextkeyword. (@koic)
Bug fixes
- #7236: Mark
Style/InverseMethodsauto-correct as incompatible withStyle/SymbolProc. (@drenmi) - #7144: Fix
Style/Documentationconstant visibility declaration in namespace. (@AdrienSldy) - #7779: Fix a false positive for
Style/MultilineMethodCallIndentationwhen using Ruby 2.7's numbered parameter. (@koic) - #7733: Fix rubocop-junit-formatter imcompatibility XML for JUnit formatter. (@koic)
- #7767: Skip array literals in
Style/HashTransformValuesandStyle/HashTransformKeys. (@tejasbubane) - #7791: Fix an error on auto-correction for
Layout/BlockEndNewlinewhen}of multiline block without processing is not on its own line. (@koic) - #7778: Fix a false positive for
Layout/EndAlignmentwhen a non-whitespace is used before theendkeyword. (@koic) - #7806: Fix an error for
Lint/ErbNewArgumentscop when inspectingActionView::Template::Handlers::ERB.new. (@koic) - #7814: Fix a false positive for
Migrate/DepartmentNamecop when inspecting an unexpected disabled comment format. (@koic) - #7728: Fix an error for
Style/OneLineConditionalwhen one of the branches contains a self keyword. (@koic) - #7825: Fix crash for
Layout/MultilineMethodCallIndentationwith key access to hash. (@tejasbubane) - #7831: Fix a false positive for
Style/HashEachMethodswhen receiver is implicit. (@koic)
Changes
- #7797: Allow unicode-display_width dependency version 1.7.0. (@yuritomanek)
- #7779: Change
AllowCommentsoption ofLint/SuppressedExceptionto true by default. (@koic) - #7320:
Naming/MethodNamenow flagsattr_reader/attr_writer/attr_accessor/attr. (@denys281) - #7813: (Breaking) Remove
Lint/EndInMethodcop. (@tejasbubane)
- Ruby
Published by bbatsov almost 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.80.1
Bug fixes
- #7719: Fix
Style/NestedParenthesizedCallscop for newline. (@tejasbubane) - #7709: Fix correction of
Style/RedundantConditionwhen the else branch contains a range. (@rrosenblum) - #7682: Fix
Style/InverseMethodsautofix leaving parenthesis. (@tejasbubane) - #7745: Suppress a pending cop warnings when pending cop's department is disabled. (@koic)
- #7759: Fix an error for
Layout/LineLengthcop when using lambda syntax that argument is not enclosed in parentheses. (@koic)
Changes
- Ruby
Published by bbatsov about 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.80
New features
- #7693: NodePattern: Add
`for descendant search. (@marcandre) - #7577: Add
AllowGemfileRubyCommentconfiguration onLayout/LeadingCommentSpace. (@cetinajero) - #7663: Add new
Style/HashTransformKeysandStyle/HashTransformValuescops. (@djudd, @eugeneius) - #7619: Support autocorrect of legacy cop names for
Migration/DepartmentName. (@koic) - #7659:
Layout/LineLengthautocorrect now breaks up long lines with blocks. (@maxh) - #7677: Add new
Style/HashEachMethodscop forHash#each_keyandHash#each_value. (@jemmaissroff) - Add
BracesRequiredMethodsparameter toStyle/BlockDelimitersto require braces for specific methods such as Sorbet'ssig. (@maxh) - #7686: Add new
JUnitFormatterformatter based onrubocop-junit-formattergem. (@koic) - #7715: Add
Steepfileto defaultIncludelist. (@ybiquitous)
Bug fixes
- #7644: Fix patterns with named wildcards in unions. (@marcandre)
- #7639: Fix logical operator edge case in
omit_parenthesesstyle ofStyle/MethodCallWithArgsParentheses. (@gsamokovarov) - #7661: Fix to return correct info from multi-line regexp. (@Tietew)
- #7655: Fix an error when processing a regexp with a line break at the start of capture parenthesis. (@koic)
- #7647: Fix an
undefined method on_numblockerror when using Ruby 2.7's numbered parameters. (@hanachin) - #7675: Fix a false negative for
Layout/SpaceBeforeFirstArgwhen a vertical argument positions are aligned. (@koic) - #7688: Fix a bug in
Style/MethodCallWithArgsParenthesesthat made--auto-gen-configcrash. (@buehmann) - #7203: Fix an infinite loop error for
Style/TernaryParentheseswithStyle/RedundantParentheseswhen usingEnforcedStyle: require_parentheses_when_complex. (@koic) - #7708: Make it possible to use EOL
rubocop:disablecomments on comment lines. (@jonas054) - #7712: Fix an incorrect autocorrect for
Style/OrAssignmentwhen usingelsifbranch. (@koic)
Changes
- #7636: Remove
consolefromLint/Debuggerto prevent false positives. (@gsamokovarov) - #7641: (Breaking) Remove
Style/BracesAroundHashParameterscop. (@pocke) - Add the method name to highlight area of
Layout/EmptyLineBetweenDefsto help provide more context. (@rrosenblum) - #7652: Allow
ppto allowed names ofNaming/MethodParameterNamecop in default config. (@masarakki) - #7309: Mark
Lint/UselessSetterCallan "not safe" and improve documentation. (@jonas054) - #7723: Enable
Migration/DepartmentNamecop by default. (@koic)
- Ruby
Published by bbatsov about 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.79
New features
- #7296: Recognize
consoleandbinding.console(rails/web-console) calls inLint/Debuggers. (@gsamokovarov) - #7567: Introduce new
pendingstatus for new cops. (@Darhazer, @pirj)
Bug fixes
- #7193: Prevent
Style/PercentLiteralDelimitersfrom changing%iliterals that contain escaped delimiters. (@buehmann) - #7590: Fix an error for
Layout/SpaceBeforeBlockBraceswhen using withEnforcedStyle: line_count_basedofStyle/BlockDelimiterscop. (@koic) - #7569: Make
Style/YodaConditionaccept__FILE__ == $0. (@koic) - #7576: Fix an error for
Gemspec/OrderedDependencieswhen using a local variable in an argument of dependent gem. (@koic) - #7595: Make
Style/NumericPredicateaware of ignored methods when specifying ignored methods. (@koic) - #7607: Fix
Style/FrozenStringLiteralCommentinfinite loop when magic comments are newline-separated. (@pirj) - #7602: Ensure proper handling of Ruby 2.7 syntax. (@drenmi)
- #7620: Fix a false positive for
Migration/DepartmentNamewhen a disable comment contains a plain comment. (@koic) - #7616: Fix an incorrect autocorrect for
Style/MultilineWhenThenfor when statement with then is an array or a hash. (@koic) - #7628: Fix an incorrect autocorrect for
Layout/MultilineBlockLayoutremoving trailing comma with single argument. (@pawptart) - #7627: Fix a false negative for
Migration/DepartmentNamewhen there is space around:(e.g.# rubocop : disable). (@koic)
Changes
- Ruby
Published by bbatsov about 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.78
New features
- #7528: Add new
Lint/NonDeterministicRequireOrdercop. (@mangara) - #7559: Add
EnforcedStyleForExponentOperatorparameter toLayout/SpaceAroundOperatorscop. (@khiav223577)
Bug fixes
- #7530: Typo in
Style/TrivialAccessors'sAllowedMethods. (@movermeyer) - #7532: Fix an error for
Style/TrailingCommaInArgumentswhen using an anonymous function with multiple line arguments withEnforcedStyleForMultiline: consistent_comma. (@koic) - #7534: Fix an incorrect autocorrect for
Style/BlockDelimiterscop andLayout/SpaceBeforeBlockBracescop withEnforcedStyle: no_spacewhen using multiline braces. (@koic) - #7231: Fix the exit code to be
2rather when0when the config file contains an unknown cop. (@jethroo) - #7513: Fix abrupt error on autocorrecting with
--disable-uncorrectable. (@tejasbubane) - #7537: Fix a false positive for
Layout/SpaceAroundOperatorswhen using a Rational literal with/(e.g.2/3r). (@koic) - #7029: Make
Style/Attrnot flag offense for customattrmethod. (@tejasbubane) - #7574: Fix a corner case that made
Style/GuardClausecrash. (@buehmann)
Changes
- #7514: Expose correctable status on offense and in formatters. (@tyler-ball)
- #7542: (Breaking) Move
LineLengthcop fromMetricsdepartment toLayoutdepartment. (@koic)
- Ruby
Published by bbatsov about 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.77
Bug fixes
- #7493: Fix
Style/RedundantReturnto inspect conditional constructs that are preceded by other statements. (@buehmann) - #7509: Fix
Layout/SpaceInsideArrayLiteralBracketsto correct empty lines. (@ayacai115) - #7517:
Style/SpaceAroundKeywordallows::aftersuper. (@ozydingo) - #7515: Fix a false negative for
Style/RedundantParentheseswhen calling a method with safe navigation operator. (@koic) - #7477: Fix line length autocorrect for semicolons in string literals. (@maxh)
- #7522: Fix a false-positive edge case (
n % 2 == 2) forStyle/EvenOdd. (@buehmann)
Changes
- #7077: (Breaking) Further standardisation of cop names. (@scottmatthewman)
- #7469: (Breaking) Replace usages of the terms
WhitelistandBlacklistwith better alternatives. (@koic) - #7502: Remove
SafeModemodule. (@koic)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.76
Bug fixes
- #7439: Make
Style/FormatStringTokenignore percent escapes (%%). (@buehmann) - #7438: Fix assignment edge-cases in
Layout/MultilineAssignmentLayout. (@gsamokovarov) - #7449: Make
Style/IfUnlessModifierrespectrubocop:disablecomments forMetrics/LineLength. (@jonas054) - #7442: Fix an incorrect autocorrect for
Style/SafeNavigationwhen an object check followed by a method call with a comment at EOL. (@koic) - #7434: Fix an incorrect autocorrect for
Style/MultilineWhenThenwhen the body ofwhenbranch starts withthen. (@koic) - #7464: Let
Performance/StartWithandPerformance/EndWithcorrect regexes that contain forward slashes. (@eugeneius)
Changes
- #7465: Add
osto allowed names ofNaming/UncommunicativeMethodParamNamecop in default config. (@nijikon) - #7446: Add
mergeto list of non-mutating methods. (@cstyles) - #7077: (Breaking) Rename
Unneeded*cops toRedundant*(e.g.,Style/UnneededPercentQbecomesStyle/RedundantPercentQ). (@scottmatthewman) - #7396: Display assignments, branches, and conditions values with the offense. (@avmnu-sng)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.75.1
Bug fixes
- #7391: Support pacman formatter on Windows. (@laurenball)
- #7407: Make
Style/FormatStringTokenwork inside hashes. (@buehmann) - #7389: Fix an issue where passing a formatter might result in an error depending on what character it started with. (@jfhinchcliffe)
- #7397: Fix extra comments being added to the correction of
Style/SafeNavigation. (@rrosenblum) - #7378: Fix heredoc edge cases in
Layout/EmptyLineAfterGuardClause. (@gsamokovarov) - #7404: Fix a false negative for
Layout/IndentAssignmentwhen multiple assignment with line breaks on each line. (@koic)
Changes
- #7410:
Style/FormatStringTokennow finds unannotated format sequences inprintfarguments. (@buehmann) - #6964: Set default
IgnoreCopDirectivestotrueforMetrics/LineLength. (@jdkaplan)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.75
New features
- #7274: Add new
Lint/SendWithMixinArgumentcop. (@koic) - #7272: Show warning message if passed string to
Enabled,Safe,SafeAutocorrect, andAutoCorrectkeys in .rubocop.yml. (@unasuke) - #7295: Make it possible to set
StyleGuideBaseURLper department. (@koic) - #7301: Add check for calls to
remote_byebugtoLint/Debuggercop. (@riley-klingler) - #7321: Allow YAML aliases in
.rubocop.yml. (@raymondfallon) - #7317: Add new formatter
pacman. (@crojasaragonez) - #6075: Support
IgnoredPatternsoption forNaming/MethodNamecop. (@koic) - #7335: Add todo as an alias to disable.
--disable-uncorrectablewill now disable cops usingrubocop:todoinstead ofrubocop:disable. (@desheikh)
Bug fixes
- #7256: Fix an error of
Style/RedundantParentheseson method calls where the first argument begins with a hash literal. (@halfwhole) - #7263: Make
Layout/SpaceInsideArrayLiteralBracketsproperly handle tab-indented arrays. (@buehmann) - #7252: Prevent infinite loops by making
Layout/SpaceInsideStringInterpolationskip over interpolations that start or end with a line break. (@buehmann) - #7262:
Lint/FormatParameterMismatchdid not recognize named format sequences like%.2<name>fwhere the name appears after some modifiers. (@buehmann) - #7253: Fix an error for
Lint/NumberConversionwhen#to_icalled without a receiver. (@koic) - #7271, #6498: Fix an interference between
Style/TrailingCommaIn*LiteralandLayout/Multiline*BraceLayoutfor arrays and hashes. (@buehmann) - #7241: Make
Style/FrozenStringLiteralCommentmatch only true & false. (@tejasbubane) - #7290: Handle inner conditional inside
elseinStyle/ConditionalAssignment. (@jonas054) - #5788: Allow block arguments on separate lines if line would be too long in
Layout/MultilineBlockLayout. (@jonas054) - #7305: Register
Style/BlockDelimitersoffense when block result is assigned to an attribute. (@mvz) - #4802: Don't leave any
Lint/UnneededCopEnableDirectiveoffenses undetected/uncorrected. (@jonas054) - #7326: Fix a false positive for
Style/AccessModifierDeclarationswhen access modifier name is used for hash literal value. (@koic) - #3591: Handle modifier
if/unlesscorrectly inLint/UselessAssignment. (@jonas054) - #7161: Fix
Style/SafeNavigationcop for preserve comments inside if expression. (@tejasbubane) - #5212: Avoid false positive for braces that are needed to preserve semantics in
Style/BracesAroundHashParameters. (@jonas054) - #7353: Fix a false positive for
Style/RedundantSelfwhen receiver and multiple assigned lvalue have the same name. (@koic) - #7353: Fix a false positive for
Style/RedundantSelfwhen a self receiver is used as a method argument. (@koic) - #7358: Fix an incorrect autocorrect for
Style/NestedModifierwhen parentheses are required in method arguments. (@koic) - #7361: Fix a false positive for
Style/TernaryParentheseswhen only the closing parenthesis is used in the last line of condition. (@koic) - #7369: Fix an infinite loop error for
Layout/IndentAssignmentwithLayout/IndentFirstArgumentwhen using multiple assignment. (@koic) - #7177, #7370: When correcting alignment, do not insert spaces into string literals. (@buehmann)
- #7367: Fix an error for
Style/OrAssignmentcop whenthenbranch body is empty. (@koic) - #7363: Fix an incorrect autocorrect for
Layout/SpaceInsideBlockBracesandStyle/BlockDelimiterswhen using multiline empty braces. (@koic) - #7212: Fix a false positive for
Layout/EmptyLinesAroundAccessModifierandUselessAccessModifierwhen using method with the same name as access modifier around a method definition. (@koic)
Changes
- #7312: Mark
Style/StringHashKeysas unsafe. (@prathamesh-sonpatki) - #7275: Make
Style/VariableNameaware argument names when invoking a method. (@koic) - #3534: Make
Style/IfUnlessModifierreport and auto-correct modifier lines that are too long. (@jonas054) - #7261:
Style/FrozenStringLiteralCommentno longer inserts an empty line after the comment. This is left toLayout/EmptyLineAfterMagicComment. (@buehmann) - #7091:
Style/FormatStringTokennow detects format sequences with flags and modifiers. (@buehmann) - #7319: Rename
IgnoredMethodPatternsoption toIgnoredPatternsoption forStyle/MethodCallWithArgsParentheses. (@koic) - #7345: Mark unsafe for
Style/YodaCondition. (@koic)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.74
New features
Bug fixes
- #7217: Make
Style/TrailingMethodEndStatementwork on more than the firstdef. (@buehmann) - #7190: Support lower case drive letters on Windows. (@jonas054)
- Fix the auto-correction of
Lint/UnneededSplatExpansionwhen the splat expansion ofArray.newwith a block is assigned to a variable. (@rrosenblum) - #5628: Fix an error of
Layout/SpaceInsideStringInterpolationon interpolations with multiple statements. (@buehmann) - #7128: Make
Metrics/LineLengthaware of shebang. (@koic) - #6861: Fix a false positive for
Layout/IndentationWidthwhen usingEnforcedStyle: outdentofLayout/AccessModifierIndentation. (@koic) - #7235: Fix an error where
Style/ConditionalAssignmentwould swallow a nestedifcondition. (@buehmann) - #7242: Make
Style/ConstantVisibilitywork on non-trivial class and module bodies. (@buehmann)
Changes
- #5265: Improved
Layout/ExtraSpacingcop to handle nested consecutive assignments. (@jfelchner) - #7215: Make it clear what's wrong in the message from
Style/GuardClause. (@jonas054) - #7245: Make cops detect string interpolations in more contexts: inside of backticks, regular expressions, and symbols. (@buehmann)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.73
New features
- Add
AllowDoxygenCommentStyleconfiguration onLayout/LeadingCommentSpace. (@anthony-robin) - #7114: Add
MultilineWhenThencop. (@okuramasafumi) - #4127: Add
--disable-uncorrectableflag to generaterubocop:disablecomments. (@vergenzt, @jonas054)
Bug fixes
- #7170: Fix a false positive for
Layout/RescueEnsureAlignmentwhen def line is preceded withprivate_class_method. (@tatsuyafw) - #7186: Fix a false positive for
Style/MixinUsagewhen using inside multiline block andifcondition is afterinclude. (@koic) - #7099: Fix an error of
Layout/RescueEnsureAlignmenton assigned blocks. (@tatsuyafw) - #5088: Fix an error of
Layout/MultilineMethodCallIndentationon method chains inside an argument. (@buehmann) - #4719: Make
Layout/Tabdetect tabs between string literals. (@buehmann) - #7203: Fix an infinite loop error for
Layout/SpaceInsideBlockBraceswhenEnforcedStyle: no_spacewithSpaceBeforeBlockParameters: falseare set in multiline block. (@koic) - #6653: Fix a bug where
Layout/IndentHeredocwould remove empty lines when autocorrecting heredocs. (@buehmann)
Changes
- #7181: Sort analyzed file alphabetically. (@pocke)
- #7188: Include inspected file location in auto-correction error. (@pocke)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.72
New features
- #7137: Add new
Gemspec/RubyVersionGlobalsUsagecop. (@malyshkosergey) - #7150: Add
AllowIfModifieroption toStyle/IfInsideElsecop. (@koic) - #7153: Add new cop
Style/FloatDivisionthat checks coercion. (@tejasbubane)
Bug fixes
- #7121: Fix
Style/TernaryParenthesescop to allow safe navigation operator without parentheses. (@timon) - #7063: Fix autocorrect in
Style/TernaryParenthesescop. (@parkerfinch) - #7106: Fix an error for
Lint/NumberConversionwhen#to_icalled 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/WordArraywithencoding: binarymagic comment and non-ASCII string. (@pocke) - #7159: Fix an error for
Lint/DuplicatedKeywhen using endless range. (@koic) - #7151: Fix
Style/WordArrayto 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/ConditionalAssignmentwhen withoutelsebranch'. (@koic) - #7171: Fix an error for
Style/SafeNavigationwhen usingunless nil?as a safeguarded'. (@koic) - #7113: This PR renames
EnforcedStyle: railstoEnabledStyle: outdented_access_modifiersforLayout/IndentationConsistency. (@koic) - #7130: Skip autocorrect in
Style/FormatStringif second argument toString#%is a variable. (@tejasbubane) - #7171: Fix an error for
Style/SafeNavigationwhen usingunless nil?as a safeguarded'. (@koic)
Changes
- #5976: Remove Rails cops. (@koic)
- #5976: Remove
rubocop -R/--railsoption. (@koic) - #7113: Rename
EnforcedStyle: railstoEnabledStyle: indented_internal_methodsforLayout/IndentationConsistency. (@koic)
- Ruby
Published by bbatsov over 6 years ago
https://github.com/rubocop/rubocop - RuboCop 0.71
New features
- #7084: Permit to specify TargetRubyVersion 2.7. (@koic)
- #7092: Node patterns can now use
*,+and?for repetitions. (@marcandre)
Bug fixes
- #7066: Fix
Layout/AlignHashwhen mixed Hash styles are used. (@rmm5t) - #7073: Fix false positive in
Naming/RescuedExceptionsVariableNamecop. (@tejasbubane) - #7090: Fix
Layout/EmptyLinesAroundBlockBodyfor multi-line method calls. (@eugeneius) - #6936: Fix
Layout/MultilineMethodArgumentLineBreakswhen bracket hash assignment on multiple lines. (@maxh) - Mark
Layout/HeredocArgumentClosingParenthesisincompatible withStyle/TrailingCommaInArguments. (@maxh)
Changes
- #5976: Warn for Rails Cops. (@koic)
- #5976: Warn for
rubocop -R/--railsoption. (@koic) - #7078: Mark
Lint/PercentStringArrayas unsafe. (@mikegee)
- Ruby
Published by bbatsov almost 7 years ago