Skip to content

Comments

Add support for itblock nodes#2162

Open
Darhazer wants to merge 1 commit intomasterfrom
add_it_block_support
Open

Add support for itblock nodes#2162
Darhazer wants to merge 1 commit intomasterfrom
add_it_block_support

Conversation

@Darhazer
Copy link
Member

I noticed on #2158 a new internal affairs cop ItblockHandler is failing so this updates rubocop to handle the new type of node.
Note: this was auto-generated by Claude Code. Please review the specs on whether the offending code makes sense. As a direction, I though if we are not handling num blocks, it does not make sense to handle it blocks, and if we handle num blocks we should support the itblock - trough the second might not be entirely true, as it blocks require there is only one parameter


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Updated documentation.
  • Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

If you have created a new cop:

  • Added the new cop to config/default.yml.
  • The cop is configured as Enabled: pending in config/default.yml.
  • The cop is configured as Enabled: true in .rubocop.yml.
  • The cop documents examples of good and bad code.
  • The tests assert both that bad code is reported and that good code is not reported.
  • Set VersionAdded: "<<next>>" in default/config.yml.

If you have modified an existing cop's configuration options:

  • Set VersionChanged: "<<next>>" in config/default.yml.

@Darhazer Darhazer requested a review from a team as a code owner February 20, 2026 10:10
it 'registers an offense' do
expect_offense(<<~RUBY)
RSpec.describe Foo do
it { it }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this does not make any sense

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.

1 participant