Skip to content

Differentiate between correctable and non-correctable KtLint rules#5324

Merged
arturbosch merged 2 commits intomainfrom
differentiate-between-correctable-ktlint-rules
Sep 24, 2022
Merged

Differentiate between correctable and non-correctable KtLint rules#5324
arturbosch merged 2 commits intomainfrom
differentiate-between-correctable-ktlint-rules

Conversation

@arturbosch
Copy link
Copy Markdown
Member

The IJ plugin allows to auto correct CorrectableCodeSmell instances.
However some rules by KtLint are not meant to be auto corrected.
We should not report a CorrectableCodeSmell for these cases.

Are there more KtLint rules of that sort?

Screenshot from 2022-09-20 15-33-35

@cortinico cortinico added this to the 1.22.0 milestone Sep 20, 2022
@arturbosch arturbosch force-pushed the differentiate-between-correctable-ktlint-rules branch from 3fbbfcb to b95eaa4 Compare September 23, 2022 20:21
@arturbosch
Copy link
Copy Markdown
Member Author

Please review again @cortinico @TWiStErRob
I've added the suggestions from @TWiStErRob

Copy link
Copy Markdown
Member

@TWiStErRob TWiStErRob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok, up to you to split the test, or add tests for true as well (if not yet).

Copy link
Copy Markdown
Member

@TWiStErRob TWiStErRob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice split

@arturbosch arturbosch force-pushed the differentiate-between-correctable-ktlint-rules branch from 634ae9f to c28b278 Compare September 24, 2022 13:13
@arturbosch arturbosch merged commit d04d85e into main Sep 24, 2022
@arturbosch arturbosch deleted the differentiate-between-correctable-ktlint-rules branch September 24, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants