-
-
Notifications
You must be signed in to change notification settings - Fork 278
Support itblock
#2077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support itblock
#2077
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,6 +68,7 @@ def on_block(node) | |
end | ||
|
||
alias on_numblock on_block | ||
alias on_itblock on_block | ||
|
||
private | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ def on_block(node) | |
end | ||
|
||
alias on_numblock on_block | ||
alias on_itblock on_block | ||
|
||
private | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ def on_block(node) | |
end | ||
|
||
alias on_numblock on_block | ||
alias on_itblock on_block | ||
|
||
private | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ module Metadata | |
(send (lvar %) #Hooks.all _ $...) | ||
PATTERN | ||
|
||
def on_block(node) | ||
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler | ||
rspec_configure(node) do |block_var| | ||
metadata_in_block(node, block_var) do |metadata_arguments| | ||
on_metadata_arguments(metadata_arguments) | ||
|
@@ -38,7 +38,6 @@ def on_block(node) | |
on_metadata_arguments(metadata_arguments) | ||
end | ||
end | ||
alias on_numblock on_block | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This module is included in 4 cops and none have tests for numblocks. So I simply removed this one. I don't think handling these blocks makes sense in context anyways and it was only added here because of the internal affairs cop |
||
|
||
def on_metadata(_symbols, _hash) | ||
raise ::NotImplementedError | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,7 @@ def on_block(node) | |
end | ||
|
||
alias on_numblock on_block | ||
alias on_itblock on_block | ||
end | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ def on_block(node) | |
end | ||
|
||
alias on_numblock on_block | ||
alias on_itblock on_block | ||
|
||
private | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec| | |
} | ||
|
||
spec.add_dependency 'lint_roller', '~> 1.1' | ||
spec.add_dependency 'rubocop', '~> 1.72', '>= 1.72.1' | ||
spec.add_dependency 'rubocop', '~> 1.75' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.75 transitively depends on |
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had no effect, so I removed it. It relies on a previous block and then simply uses
next_sibling
together withany_block
(which includesitblock
). I only added tests to show it already works.