Skip to content

@bbatsov bbatsov released this Jun 25, 2019 · 3 commits to master since this release

New features

Bug fixes

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

Changes

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

@bbatsov bbatsov released this May 30, 2019 · 57 commits to master since this release

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/AlignHash when mixed Hash styles are used. (@rmm5t)
  • #7073: Fix false positive in Naming/RescuedExceptionsVariableName cop. (@tejasbubane)
  • #7090: Fix Layout/EmptyLinesAroundBlockBody for multi-line method calls. (@eugeneius)
  • #6936: Fix Layout/MultilineMethodArgumentLineBreaks when bracket hash assignment on multiple lines. (@maxh)
  • Mark Layout/HeredocArgumentClosingParenthesis incompatible with Style/TrailingCommaInArguments. (@maxh)

Changes

Assets 2

@bbatsov bbatsov released this May 21, 2019 · 79 commits to master since this release

New features

  • #6649: Layout/AlignHash supports list of options. (@stoivo)
  • Add IgnoreMethodPatterns config option to Style/MethodCallWithArgsParentheses. (@tejasbubane)
  • #7059: Add EnforcedStyle to Layout/EmptyLinesAroundAccessModifier. (@koic)
  • #7052: Add AllowComments option to Lint/HandleExceptions. (@tejasbubane)

Bug fixes

  • #7013: Respect DisabledByDefault for custom cops. (@XrXr)
  • #7043: Prevent RDoc error when installing RuboCop 0.69.0 on Ubuntu. (@koic)
  • #7023: Autocorrection for Lint/NumberConversion. (@Bhacaz)

Changes

Assets 2

@koic koic released this May 13, 2019 · 101 commits to master since this release

New features

  • Add support for subclassing using Class.new to Lint/InheritException. (@houli)
  • #6779: Add new cop Style/NegativeUnless that checks for unless with negative condition. (@tejasbubane)

Bug fixes

  • #6900: Fix Rails/TimeZone autocorrect Time.current to Time.zone.now. (@vfonic)
  • #6900: Fix Rails/TimeZone to prefer Time.zone.#{method} over other acceptable corrections. (@vfonic)
  • #7007: Fix Style/BlockDelimiters with braces_for_chaining style false positive, when chaining using safe navigation. (@Darhazer)
  • #6880: Fix .rubocop file parsing. (@hoshinotsuyoshi)
  • #5782: Do not autocorrect Lint/UnifiedInteger if TargetRubyVersion < 2.4. (@lavoiesl)
  • #6387: Prevent Lint/NumberConversion from reporting error with Time/DateTime. (@tejasbubane)
  • #6980: Fix Style/StringHashKeys to allow string as keys for hash arguments to gsub methods. (@tejasbubane)
  • #6969: Fix a false positive with block methods in Style/InverseMethods. (@dduugg)
  • #6729: Handle array spread for change_column_default in Rails/ReversibleMigration cop. (@tejasbubane)
  • #7033: Fix an error for Layout/EmptyLineAfterGuardClause when guard clause is a ternary operator. (@koic)

Changes

  • #6945: Drop support for Ruby 2.2. (@koic)
  • #6945: Set default EnforcedStyle to squiggly option for Layout/IndentHeredoc and auto_detection option is removed. (@koic)
  • #6945: Set default EnforcedStyle to always option for Style/FrozenStringLiteralComment and when_needed option is removed. (@koic)
  • #7027: Allow unicode/display_width dependency version 1.6.0. (@tagliala)
Assets 2

@bbatsov bbatsov released this Apr 30, 2019 · 138 commits to master since this release

Bug fixes

  • #6993: Allowing for empty if blocks, preventing Style/SafeNavigation from crashing. (@RicardoTrindade)
  • #6995: Fix an incorrect auto-correct for Style/RedundantParentheses when enclosed in parentheses at while-post or until-post. (@koic)
  • #6996: Fix a false positive for Style/RedundantFreeze when freezing the result of String#*. (@bquorning)
  • #6998: Fix autocorrect of Naming/RescuedExceptionsVariableName to also rename all references to the variable. (@Darhazer)
  • #6992: Fix unknown default configuration for Layout/IndentFirstParameter cop. (@drenmi)
  • #6972: Fix a false positive for Style/MixinUsage when using inside block and if condition is after include. (@koic)
  • #6738: Prevent auto-correct conflict of Style/Next and Style/SafeNavigation. (@hoshinotsuyoshi)
  • #6847: Fix Style/BlockDelimiters to properly check if the node is chaned when braces_for_chaining is set. (@att14)
Assets 2

@bbatsov bbatsov released this Apr 29, 2019 · 153 commits to master since this release

New features

  • #6973: Add always_braces to Style/BlockDelimiter. (@iGEL)
  • #6841: Node patterns can now match children in any order using <>. (@marcandre)
  • #6928: Add --init option for generate .rubocop.yml file in the current directory. (@koic)
  • Add new Layout/HeredocArgumentClosingParenthesis cop. (@maxh)
  • #6895: Add support for XDG config home for user-config. (@Mange, @tejasbubane)
  • Add initial autocorrection support to Metrics/LineLength. (@maxh)
  • Add Layout/IndentFirstParameter. (@maxh)
  • #6974: Make Layout/FirstMethodArgumentLineBreak aware of calling using super. (@koic)
  • Add new Lint/HeredocMethodCallPosition cop. (@maxh)

Bug fixes

  • Do not annotate message with cop name in JSON output. (@elebow)
  • #6914: Fix an error for Rails/RedundantAllowNil when with interpolations. (@Blue-Pix)
  • #6888: Fix an error for Rails/ActiveRecordOverride when no parent_class present. (@diachini)
  • #6941: Add missing absence validations to Rails/Validation. (@jmanian)
  • #6926: Allow nil values to unset config defaults. (@dduugg)
  • #6946: Allow Rails/ReflectionClassName to use string interpolation for class_name. (@r7kamura)
  • #6778: Fix a false positive in Style/HashSyntax cop when a hash key is an interpolated string and EnforcedStyle is ruby19_no_mixed_keys. (@tatsuyafw)
  • #6902: Fix a bug where Naming/RescuedExceptionsVariableName would handle an only first rescue for multiple rescue groups. (@tatsuyafw)
  • #6860: Prevent auto-correct conflict of Style/InverseMethods and Style/Not. (@hoshinotsuyoshi)
  • #6935: Layout/AccessModifierIndentation should ignore access modifiers that apply to specific methods. (@deivid-rodriguez)
  • #6956: Prevent auto-correct confliction of Lint/Lambda and Lint/UnusedBlockArgument. (@koic)
  • #6915: Fix false positive in Style/SafeNavigation when a modifier if is safe guarding a method call being passed to break, fail, next, raise, return, throw, and yield. (@rrosenblum)
  • #6822: Fix Lint/LiteralInInterpolation autocorrection for single quotes. (@hoshinotsuyoshi)
  • #6985: Fix an incorrect auto-correct for Lint/LiteralInInterpolation if contains array percent literal. (@yakout)

Changes

  • #6966: Mark Rails/TimeZone as unsafe. (@vfonic)
  • #5977: Remove Performance cops. (@koic)
  • Add auto-correction to Naming/RescuedExceptionsVariableName. (@anthony-robin)
  • #6903: Handle variables prefixed with _ in Naming/RescuedExceptionsVariableName cop. (@anthony-robin)
  • #6917: Bump Bundler dependency to >= 1.15.0. (@koic)
  • Add --auto-gen-only-exclude to the command outputted in rubocop_todo.yml if the option is specified. (@dvandersluis)
  • #6887: Allow Lint/UnderscorePrefixedVariableName cop to be configured to allow use of block keyword args. (@dduugg)
  • #6885: Revert adding psych >= 3.1 as runtime dependency. (@andreaseger)
  • Rename Layout/FirstParameterIndentation to Layout/IndentFirstArgument. (@maxh)
  • Extract method call argument alignment behavior from Layout/AlignParameters into Layout/AlignArguments. (@maxh)
  • Rename IndentArray and IndentHash to IndentFirstArrayElement and IndentFirstHashElement. (@maxh)
Assets 2

@koic koic released this Apr 5, 2019 · 258 commits to master since this release

Bug fixes

  • #6882: Fix an error for Rails/RedundantAllowNil when not using both allow_nil and allow_blank. (@koic)
Assets 2

@koic koic released this Apr 4, 2019 · 261 commits to master since this release

Changes

  • #6881: Set default PreferredName to e for Naming/RescuedExceptionsVariableName. (@koic)
Assets 2

@bbatsov bbatsov released this Apr 4, 2019 · 263 commits to master since this release

New features

  • #5184: Add new multiline element line break cops. (@maxh)
  • Add new cop Rails/ActiveRecordOverride that checks for overriding Active Record methods instead of using callbacks. (@elebow)
  • Add new cop Rails/RedundantAllowNil that checks for cases when allow_blank makes allow_nil unnecessary in model validations. (@elebow)
  • Add new Naming/RescuedExceptionsVariableName cop. (@AdrienSldy)

Bug fixes

  • #6761: Make Naming/UncommunicativeMethodParamName account for param names prefixed with underscores. (@thomthom)
  • #6855: Fix an exception in Rails/RedundantReceiverInWithOptions when the body is empty. (@ericsullivan)
  • #6856: Fix auto-correction for Style/BlockComments when the file is missing a trailing blank line. (@ericsullivan)
  • #6858: Fix an incorrect auto-correct for Lint/ToJSON when there are no to_json arguments. (@koic)
  • #6865: Fix deactivated StyleGuideBaseURL for Layout/ClassStructure. (@aeroastro)
  • #6868: Fix Rails/LinkToBlank auto-correct bug when using symbol for target. (@r7kamura)
  • #6869: Fix false positive for Rails/LinkToBlank when rel is a symbol value. (@r7kamura)
  • Add IncludedMacros param to default rubocop config for Style/MethodCallWithArgsParentheses. (@maxh)
  • #6785: Do not register an offense for Rails/Present or Rails/Blank in an unless else context when Style/UnlessElse is enabled. (@rrosenblum)

Changes

  • #6854: Mark Rails/LexicallyScopedActionFilter as unsafe and document risks. (@urbanautomaton)
  • #5977: Warn for Performance Cops. (@koic)
  • #6637: Move LstripRstrip from Performance to Style department and rename it to Strip. (@anuja-joshi)
  • #6875: Mention block form of Struct.new in Style/StructInheritance. (@XrXr)
  • #6871: Move Performance/RedundantSortBy, Performance/UnneededSort and Performance/Sample to the Style department. (@bbatsov)
Assets 2

@bbatsov bbatsov released this Mar 18, 2019 · 299 commits to master since this release

New features

  • #6393: Add AllowBracesOnProceduralOneLiners option to fine-tune Style/BlockDelimiter's semantic mode. (@davearonson)
  • #6383: Add AllowBeforeTrailingComments option on Layout/ExtraSpacing cop. (@davearonson)
  • New cop Lint/SafeNavigationWithEmpty checks for foo&.empty? in conditionals. (@rspeicher)
  • Add new Style/ConstantVisibility cop for enforcing visibility declarations of class and module constants. (@drenmi)
  • #6378: Add Lint/ToJSON cop to enforce an argument when overriding #to_json. (@allcentury)
  • #6346: Add auto-correction to Rails/TimeZone. (@dcluna)
  • #6840: Node patterns now allow unlimited elements after .... (@marcandre)

Bug fixes

  • #4321: Fix false offense for Style/RedundantSelf when the method is also defined on Kernel. (@mikegee)
  • #6821: Fix false negative for Rails/LinkToBlank when _blank is a symbol. (@Intrepidd)
  • #6699: Fix infinite loop for Layout/IndentationWidth and Layout/IndentationConsistency when bad modifier indentation before good method definition. (@koic)
  • #6777: Fix a false positive for Style/TrivialAccessors when using trivial reader/writer methods at the top level. (@koic)
  • #6799: Fix errors for Style/ConditionalAssignment, Style/IdenticalConditionalBranches, Lint/ElseLayout, and Layout/IndentationWidth with empty braces. (@pocke)
  • #6802: Fix auto-correction for Style/SymbolArray with array contains interpolation when EnforcedStyle is brackets. (@pocke)
  • #6797: Fix false negative for Layout/SpaceAroundBlockParameters on block parameter with parens. (@pocke)
  • #6798: Fix infinite loop for Layout/SpaceAroundBlockParameters with EnforcedStyleInsidePipes: :space. (@pocke)
  • #6803: Fix error for Style/NumericLiterals on a literal that contains spaces. (@pocke)
  • #6801: Fix auto-correction for Style/Lambda with no-space argument. (@pocke)
  • #6804: Fix auto-correction of Style/NumericLiterals on numeric literal with exponent. (@pocke)
  • #6800: Fix an incorrect auto-correct for Rails/Validation when method arguments are enclosed in parentheses. (@koic)
  • #6808: Prevent false positive in Naming/ConstantName when assigning a frozen range. (@drenmi)
  • Fix the calculation of Metrics/AbcSize. Comparison methods and else branches add to the comparison count. (@rrosenblum)
  • #6791: Allow Rails/ReflectionClassName to use symbol argument for class_name. (@unasuke)
  • #5465: Fix Layout/ClassStructure to allow grouping macros by their visibility. (@gprado)
  • #6461: Restrict Ctrl-C handling to RuboCop's loop and simplify it to a single phase. (@deivid-rodriguez)

Changes

  • Add $stdout/$stderr and STDOUT/STDERR method calls to Rails/Output. (@elebow)
  • #6688: Add iterator? to deprecated methods and prefer block_given? instead. (@tejasbubane)
  • #6806: Remove powerpack dependency. (@dduugg)
  • #6810: Exclude gemspec file by default for Metrics/BlockLength cop. (@koic)
  • #6813: Allow unicode/display_width dependency version 1.5.0. (@tagliala)
  • Make Style/RedundantFreeze aware of methods that will produce frozen objects. (@rrosenblum)
  • #6675: Avoid printing deprecation warnings about constants. (@elmasantos)
  • #6746: Avoid offense on $stderr.puts with no arguments. (@luciamo)
  • Replace md5 with sha1 for FIPS compliance. (@dirtyharrycallahan)
Assets 2
You can’t perform that action at this time.