Skip to content
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

value-argument-comment / value-parameter-argument should not report about comments at end of line #2519

Closed
paul-dingemans opened this issue Jan 28, 2024 · 0 comments · Fixed by #2551
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

The value-argument-comment rule currently report violations about comments which from the parsers perspective are not inner elements of the value-argument but of the value-argument-list. Similar for value-parameter-comment.

Screenshot 2024-01-28 at 16 35 39 Screenshot 2024-01-28 at 16 40 34

The rules should no longer check for those comments for following reasons:

  • The comment is not part of the element after which the rule is named
  • It is a common accepted practice to add EOL comments after a comma to document the argument/parameter before the comma. For inner comments, it still seems valid that that is a bad practice.
  • The argument that EOL-comment are messed up when reordering arguments/parameters using Intelli IDEA refactoring is invalid as the same problem also occurs when the comments are placed on separate lines (see this comment).
@paul-dingemans paul-dingemans added this to the 1.2 milestone Jan 28, 2024
paul-dingemans added a commit that referenced this issue Feb 13, 2024
…comment`

EOL comments which are just before or after a value argument or value parameter do not belong to the VALUE_ARGUMENT or VALUE_PARAMETER AST node but to the out LIST element. So this rule only reports comments that are actually inside the VALUE_ARGUMENT or VALUE_PARAMETER node.

Closes #2519
paul-dingemans added a commit that referenced this issue Feb 14, 2024
…comment` (#2551)

EOL comments which are just before or after a value argument or value parameter do not belong to the VALUE_ARGUMENT or VALUE_PARAMETER AST node but to the out LIST element. So this rule only reports comments that are actually inside the VALUE_ARGUMENT or VALUE_PARAMETER node.

Closes #2519
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 a pull request may close this issue.

1 participant