pinterest / ktlint

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

Ignore EOL comment that causes max_line_length to be exceeded, except in max-line-length rule #2516

Closed paul-dingemans closed 5 months ago

paul-dingemans commented 5 months ago

Description

Ignore EOL comment that causes max_line_length to be exceeded, except in max-line-length rule

Rules should not start wrapping code in case the max_line_length is exceeded because of the EOL comment. The developer should determine whether the EOL comment should be shortened, or be placed on a separate line instead of wrapping via autocorrect.

Closes #2450

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