Skip to content

Bump rubocop from 1.81.7 to 1.84.1 - #367

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/rubocop-1.84.1
Open

Bump rubocop from 1.81.7 to 1.84.1#367
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/bundler/rubocop-1.84.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Feb 6, 2026

Copy link
Copy Markdown
Contributor

Bumps rubocop from 1.81.7 to 1.84.1.

Release notes

Sourced from rubocop's releases.

RuboCop v1.84.1

Bug fixes

  • #14803: Fix an error for Layout/IndentationWidth cop. (@​viralpraxis)
  • #14806: Fix an error in Style/NegativeArrayIndex when using self as array with implicit self receiver. (@​koic)
  • #14813: Fix opt-in cop comments taking precedence over configuration file exclude patterns. (@​afrase)
  • #14819: Fix incorrect autocorrect for Style/GuardClause when using heredoc as an argument of method call in raise in else branch. (@​koic)
  • #14805: Bring back the original indentation from before version 1.84.0. (@​Magikdidi24)
  • #12754: Fix an infinite loop for Style/IfUnlessModifier when multiple if/unless statements share the same line in arrays, method arguments, or hash values. (@​ydakuka)
  • #14817: Fix an infinite loop between Layout/FirstArgumentIndentation and Layout/LineLength when correcting method chains. (@​ydakuka)
  • #11513: Fix Layout/MultilineMethodCallIndentation to properly handle method chains inside hash pair values. (@​ydakuka)
  • #14814: Fix push/pop directives to properly handle nested scopes and state restoration. (@​Magikdidi24)

Changes

  • #14823: Add the built-in infinite? method to the allowlists for Naming/PredicateMethod, Style/IfWithBooleanLiteralBranches, and Style/RedundantCondition, in addition to the existing nonzero?. (@​koic)
  • #14735: Remove deprecated InjectDefaults handling. (@​afurm)

RuboCop v1.84.0

New features

  • #14516: Add AllowImplicitArrayLiterals to Layout/FirstArrayElementLineBreak. (@​koic)
  • #14750: Add new Style/ReverseFind cop. (@​koic)
  • #12343: Add new Style/EmptyClassDefinition cop to enforce consistent style for empty class definitions. The cop can enforce either a two-line class definition or Class.new for classes with no body. (@​ydakuka)
  • #14769: Add new Style/HashLookupMethod cop to enforce Hash#[] vs Hash#fetch preference. ([@​sferik][])
  • #12051: Add new Style/NegativeArrayIndex cop to enforce using negative array indices instead of calculating array length minus a value. The cop handles both simple index patterns and range patterns, and recognizes preserving methods and their combinations. (@​ydakuka)
  • #14633: Make a new system to handle push and pop locally. (@​Magikdidi24)
  • #14722: Support TargetRubyVersion 4.1 (experimental). (@​koic)

Bug fixes

  • #14697: Allow non-method calls in Categories for Layout/ClassStructure. ([@​fatkodima][])
  • #14784: Fix an error for Style/GuardClause when using heredoc as an argument of raise in else branch and if branch is empty. (@​koic)
  • #14790: Fix an error for Style/HashLookupMethod cop when there's no receiver. (@​viralpraxis)
  • #14779: Fix autocorrect crash with ruby_extractor when using offset: 0 and different source buffers. (@​ydakuka)
  • #14762: Fix false negatives for Style/RedundantCondition when the branches contains constant assignment. (@​koic)
  • #14751: Fix --force-default-config not preventing project config loading when used with options that access configuration. ([@​sakuro][])
  • #14783: Fix incorrect autocorrect for Style/HashSyntax when shorthand syntax is used in condition of if/unless/while/until. (@​ydakuka)
  • #14747: Fix a regression inLayout/IndentationWidth by adding a new EnforcedStyleAlignWith style parameter. ([@​MikeMcQuaid][])
  • #14716: Fix an infinite loop error for Layout/LineLength when SplitStrings option is enabled and strings span multiple lines. ([@​HariprasanthMSH][])
  • #14763: Fix an infinite loop error for Layout/IndentationWidth and Layout/IndentationConsistency when using EnforcedStyle: indented_internal_methods with method chain blocks. (@​ydakuka)
  • #9373: Fix an infinite loop error for Layout/IndentationWidth when autocorrecting mixed tabs and spaces in blocks. Fix an infinite loop error for Layout/DefEndAlignment and Layout/IndentationStyle when autocorrecting mixed tabs and spaces. Autocorrection for tabs is disabled in AlignmentCorrector for indentation offenses, but enabled for align_end. (@​ydakuka)
  • #12295: Fix Layout/FirstArgumentIndentation to correct entire method calls and chains for nested calls. (@​ydakuka)

... (truncated)

Changelog

Sourced from rubocop's changelog.

1.84.1 (2026-02-02)

Bug fixes

  • #14803: Fix an error for Layout/IndentationWidth cop. ([@​viralpraxis][])
  • #14806: Fix an error in Style/NegativeArrayIndex when using self as array with implicit self receiver. ([@​koic][])
  • #14813: Fix opt-in cop comments taking precedence over configuration file exclude patterns. ([@​afrase][])
  • #14819: Fix incorrect autocorrect for Style/GuardClause when using heredoc as an argument of method call in raise in else branch. ([@​koic][])
  • #14805: Bring back the original indentation from before version 1.84.0. ([@​Magikdidi24][])
  • #12754: Fix an infinite loop for Style/IfUnlessModifier when multiple if/unless statements share the same line in arrays, method arguments, or hash values. ([@​ydakuka][])
  • #14817: Fix an infinite loop between Layout/FirstArgumentIndentation and Layout/LineLength when correcting method chains. ([@​ydakuka][])
  • #11513: Fix Layout/MultilineMethodCallIndentation to properly handle method chains inside hash pair values. ([@​ydakuka][])
  • #14814: Fix push/pop directives to properly handle nested scopes and state restoration. ([@​Magikdidi24][])

Changes

  • #14823: Add the built-in infinite? method to the allowlists for Naming/PredicateMethod, Style/IfWithBooleanLiteralBranches, and Style/RedundantCondition, in addition to the existing nonzero?. ([@​koic][])
  • #14735: Remove deprecated InjectDefaults handling. ([@​afurm][])

1.84.0 (2026-01-27)

New features

  • #14516: Add AllowImplicitArrayLiterals to Layout/FirstArrayElementLineBreak. ([@​koic][])
  • #14750: Add new Style/ReverseFind cop. ([@​koic][])
  • #12343: Add new Style/EmptyClassDefinition cop to enforce consistent style for empty class definitions. The cop can enforce either a two-line class definition or Class.new for classes with no body. ([@​ydakuka][])
  • #14769: Add new Style/HashLookupMethod cop to enforce Hash#[] vs Hash#fetch preference. ([@​sferik][])
  • #12051: Add new Style/NegativeArrayIndex cop to enforce using negative array indices instead of calculating array length minus a value. The cop handles both simple index patterns and range patterns, and recognizes preserving methods and their combinations. ([@​ydakuka][])
  • #14633: Make a new system to handle push and pop locally. ([@​Magikdidi24][])
  • #14722: Support TargetRubyVersion 4.1 (experimental). ([@​koic][])

Bug fixes

  • #14697: Allow non-method calls in Categories for Layout/ClassStructure. ([@​fatkodima][])
  • #14784: Fix an error for Style/GuardClause when using heredoc as an argument of raise in else branch and if branch is empty. ([@​koic][])
  • #14790: Fix an error for Style/HashLookupMethod cop when there's no receiver. ([@​viralpraxis][])
  • #14779: Fix autocorrect crash with ruby_extractor when using offset: 0 and different source buffers. ([@​ydakuka][])
  • #14762: Fix false negatives for Style/RedundantCondition when the branches contains constant assignment. ([@​koic][])
  • #14751: Fix --force-default-config not preventing project config loading when used with options that access configuration. ([@​sakuro][])
  • #14783: Fix incorrect autocorrect for Style/HashSyntax when shorthand syntax is used in condition of if/unless/while/until. ([@​ydakuka][])
  • #14747: Fix a regression inLayout/IndentationWidth by adding a new EnforcedStyleAlignWith style parameter. ([@​MikeMcQuaid][])
  • #14716: Fix an infinite loop error for Layout/LineLength when SplitStrings option is enabled and strings span multiple lines. ([@​HariprasanthMSH][])
  • #14763: Fix an infinite loop error for Layout/IndentationWidth and Layout/IndentationConsistency when using EnforcedStyle: indented_internal_methods with method chain blocks. ([@​ydakuka][])
  • #9373: Fix an infinite loop error for Layout/IndentationWidth when autocorrecting mixed tabs and spaces in blocks. Fix an infinite loop error for Layout/DefEndAlignment and Layout/IndentationStyle when autocorrecting mixed tabs and spaces. Autocorrection for tabs is disabled in AlignmentCorrector for indentation offenses, but enabled for align_end. ([@​ydakuka][])
  • #12295: Fix Layout/FirstArgumentIndentation to correct entire method calls and chains for nested calls. ([@​ydakuka][])
  • #12527: Fix Offense#highlighted_area to return a valid Parser::Source::Range. ([@​ydakuka][])
  • #14801: Preserve source tabs in Clang and Tap formatters when displaying offense highlight. ([@​lovro-bikic][])
  • #14761: Improved the remote configuration file name on the cache location. ([@​Jack12816][])
  • #14778: Fix a false positive for Security/JSONLoad when create_additions option is passed with other options in a hash. ([@​wktk][])
  • #14796: Handle logical and operator assignment nodes in variable branch handling. ([@​lovro-bikic][])

... (truncated)

Commits
  • 5a774b3 Cut 1.84.1
  • 88d04ca Update Changelog
  • c4f9c22 Disallow directory paths in inject_defaults!
  • 7e43e4e Fix LSP disable comment edits for multiline literals (#14758)
  • 15f751d [Fix rubocop#11513] Fix Layout/MultilineMethodCallIndentation to properly h...
  • 29f5607 [Fix rubocop#12754] Fix an infinite loop for Style/IfUnlessModifier when mu...
  • 4ae10a7 [Fix rubocop#14817] Fix an infinite loop between `Layout/FirstArgumentIndenta...
  • aa6821c Merge pull request #14813 from afrase/fix-exclude-pattern-precedence
  • 558161c Allowlist infinite? for some cops
  • 3435c95 Changed cop exclusion precedence to favor configuration
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.81.7 to 1.84.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](rubocop/rubocop@v1.81.7...v1.84.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-version: 1.84.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code labels Feb 6, 2026
@claude

claude Bot commented Feb 7, 2026

Copy link
Copy Markdown

🔍 Обзор Pull Request: Обновление RuboCop 1.81.7 → 1.84.1

Этот PR обновляет RuboCop и связанные зависимости. Вот детальный анализ:

✅ Что изменилось

Основные зависимости:

  • rubocop: 1.81.7 → 1.84.1 (2 минорных релиза)
  • rubocop-ast: 1.48.0 → 1.49.0
  • parser: 3.3.10.0 → 3.3.10.1
  • prism: 1.6.0 → 1.9.0
  • json: 2.16.0 → 2.18.1
  • unicode-emoji: 4.1.0 → 4.2.0

📋 Новые функции в RuboCop 1.84.0-1.84.1

Новые копы (автоматически включены из-за NewCops: enable):

  1. Style/ReverseFind - предлагает использовать reverse.find вместо менее эффективных паттернов
  2. Style/EmptyClassDefinition - обеспечивает единообразный стиль пустых определений классов
  3. Style/HashLookupMethod - предпочитает Hash#[] или Hash#fetch
  4. Style/NegativeArrayIndex - предлагает использовать отрицательные индексы вместо array[array.length - n]

Важные исправления:

  • ✅ Исправлены множественные бесконечные циклы в Layout/IndentationWidth, Layout/LineLength, Style/IfUnlessModifier
  • ✅ Улучшена работа с heredoc в Style/GuardClause
  • ✅ Исправлена работа Style/HashSyntax с shorthand синтаксисом
  • ✅ Улучшена обработка цепочек методов в различных Layout копах

⚠️ Потенциальные проблемы

  1. Новые копы автоматически включены: Так как в .rubocop.yml установлено NewCops: enable, все 4 новых копа будут автоматически активированы. Это может привести к новым нарушениям в существующем коде.

  2. Изменения в поведении отступов: В версии 1.84.0 были существенные изменения в Layout/IndentationWidth, которые частично откатили в 1.84.1 (issue #14805). Это может повлиять на автокоррекцию существующего кода.

  3. Удалена поддержка InjectDefaults: Устаревшая функциональность InjectDefaults была удалена (#14735). Если проект её использует - это проблема.

🔧 Рекомендации

Обязательно:

  1. Запустить тесты: Убедитесь, что CI проходит успешно

    make test
  2. Проверить RuboCop на всей кодовой базе:

    bundle exec rubocop
  3. Проверить автокоррекцию (в отдельной ветке):

    bundle exec rubocop --autocorrect-all

Опционально:

  1. Рассмотреть отключение новых копов, если они не подходят проекту:

    # В .rubocop.yml
    Style/ReverseFind:
      Enabled: false
    Style/EmptyClassDefinition:
      Enabled: false
    Style/HashLookupMethod:
      Enabled: false
    Style/NegativeArrayIndex:
      Enabled: false
  2. Проверить git hooks: Так как проект использует pre-commit hook с RuboCop, убедитесь, что он работает корректно после обновления.

🎯 Оценка безопасности

  • Безопасность: Обновление патчит несколько багов, включая крэши и бесконечные циклы
  • Совместимость: Минорное обновление, breaking changes не ожидаются
  • Зависимости: Все обновления в пределах semver constraints

📝 Заключение

Рекомендация: ✅ ОДОБРИТЬ после проверки CI

Это стандартное обновление зависимостей от Dependabot. Основные риски:

  • Новые копы могут найти нарушения в существующем коде
  • Небольшие изменения в поведении автокоррекции

Действия перед мержем:

  1. ✅ Дождаться прохождения CI
  2. ✅ Проверить, что bundle exec rubocop не находит новых нарушений
  3. ✅ Если есть новые нарушения - исправить или отключить соответствующие копы

Этот обзор подготовлен автоматически на основе анализа изменений в RuboCop 1.84.0-1.84.1 и конфигурации проекта.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants