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
Add trailing whitespace rule #780
Add trailing whitespace rule #780
Conversation
51e3918
to
082c4c2
Compare
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.
Thanks!
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.
Another candidate that would benefit from auto correction.
What should I do to add this feature to auto correction? It would be nice to add it in a follow up PR. |
I proposed auto correction here but it didn't get approved. I'm just nagging on each rule that would benefit from it in hope that we'll get auto correcting. |
As @vanniktech mentioned atm detekt does not have rules with auto correction. |
082c4c2
to
3a98bde
Compare
Debt.FIVE_MINS) | ||
|
||
override fun visitKtFile(file: KtFile) { | ||
val lines = file.text.splitToSequence("\n") |
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 should be added to the FileParsingRule
.
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.
Like the other two rules, lets make use of FileParsingRule
to not split every file multiple times to a line sequence ^^
3a98bde
to
72f9aca
Compare
@arturbosch I addressed your comments. Please re-review at your convenience. |
I didn't add <compliant> and <noncompliant> blocks to the KDoc because it's really easy to understand what the rule does and it's hard to see those white spaces at the end of the lines in the KDoc comments.