pinterest / ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
https://pinterest.github.io/ktlint/
MIT License
6.07k stars 504 forks source link

Ignore EOL comments in `value-argument-comment` and `value-parameter-comment` #2551

Closed paul-dingemans closed 4 months ago

paul-dingemans commented 4 months ago

Description

Ignore EOL comments in value-argument-comment and value-parameter-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

Checklist

Before submitting the PR, please check following (checks which are not relevant may be ignored):

Documentation is updated. See difference between snapshot and release documentation