Add InternalAffairs/NodeFirstOrLastArgument cop#12305
Merged
bbatsov merged 1 commit intorubocop:masterfrom Nov 5, 2023
Merged
Conversation
4566d69 to
fd65d98
Compare
sambostock
commented
Oct 24, 2023
bd17210 to
81eef26
Compare
koic
reviewed
Oct 30, 2023
changelog/new_add_internal_affairs_node_first_or_last_argument.md
Outdated
Show resolved
Hide resolved
Member
|
Can you squash your commits into one? |
81eef26 to
0539fec
Compare
0539fec to
5308f8d
Compare
koic
reviewed
Oct 30, 2023
Member
There was a problem hiding this comment.
Can you rename changelog/new_add_internal_affairs_node_first_or_last_argument.md to changelog/change_require_rubocop_ast_version_1_30_or_greater.md?
This cop checks for `node.arguments.first` and `node.arguments.last`, and corrects them to `node.first_argument` and `node.last_argument`, respectively. Version 1.30 of `rubocop-ast` adds support for `first_argument` on block nodes, and is therefore required for this cop not to produce false positives for those node types.
5308f8d to
6e22be7
Compare
Collaborator
|
Seems we were quite consistent even before this change, but I don't mind it. Thanks! |
koic
added a commit
to koic/rubocop-rails
that referenced
this pull request
Nov 5, 2023
9 tasks
koic
added a commit
to koic/rubocop-performance
that referenced
this pull request
Nov 5, 2023
8 tasks
koic
added a commit
to koic/rubocop-minitest
that referenced
this pull request
Nov 5, 2023
8 tasks
koic
added a commit
to koic/rubocop-minitest
that referenced
this pull request
Nov 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This cop checks for
node.arguments.firstandnode.arguments.last, and corrects them tonode.first_argumentandnode.last_argument, respectively.Motivation for rubocop/rubocop-ast#270.
Before submitting the PR make sure the following are checked:
Commit message starts with[Fix #issue-number](if the related issue exists).master(if not - rebase it).bundle exec rake default. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.mdif the new code introduces user-observable changes. See changelog entry format for details.