KEMBAR78
[Fix #14399] Fix false positives for `Layout/EmptyLinesAfterModuleInclusion` by koic · Pull Request #14400 · rubocop/rubocop · GitHub
Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Jul 29, 2025

This PR fixes false positives for Layout/EmptyLinesAfterModuleInclusion when prepend is used with block methods.

Fixes #14399.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

…duleInclusion`

This PR fixes false positives for `Layout/EmptyLinesAfterModuleInclusion`
when `prepend` is used with block methods.

Fixes rubocop#14399.
@koic koic changed the title [Fix #14339] Fix false positives for Layout/EmptyLinesAfterModuleInclusion [Fix #14399] Fix false positives for Layout/EmptyLinesAfterModuleInclusion Jul 29, 2025
@koic koic force-pushed the fix_false_positive_for_layout_empty_lines_after_module_inclusion branch from a5576a4 to 13c5050 Compare July 29, 2025 10:02
@koic koic merged commit 9d262b1 into rubocop:master Jul 29, 2025
23 checks passed
@koic koic deleted the fix_false_positive_for_layout_empty_lines_after_module_inclusion branch July 29, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Layout/EmptyLinesAfterModuleInclusion cop behaves incorrectly when using Module.new

1 participant