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

Statement-wrapping rule is not executed #2176

Closed
paul-dingemans opened this issue Aug 11, 2023 · 0 comments · Fixed by #2178
Closed

Statement-wrapping rule is not executed #2176

paul-dingemans opened this issue Aug 11, 2023 · 0 comments · Fixed by #2178
Assignees
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

paul-dingemans commented Aug 11, 2023

Ktlint 0.50.0 has introduced rule statement-wrapping. This rule is never run except in unit tests as it is not added to the StandardRulesetProvider.

The reason that this was not detected before is that the unit test that checks whether each rule is added to the StandardRuleSetProvider requires the class name of the rule to end with Rule. The class StatementWrapping was missing this suffix. Also other classes are missing this suffix but were added to the StandardRuleSetProvider.

@paul-dingemans paul-dingemans added this to the 1.0 (Yeah!) milestone Aug 11, 2023
@paul-dingemans paul-dingemans self-assigned this Aug 11, 2023
paul-dingemans added a commit that referenced this issue Aug 12, 2023
 Closes #2170

 Align names of Rule classes, file and `RULE_ID` constants

 Closes #2176

 Do not wrap a single line enum class

 Closes #2177
paul-dingemans added a commit that referenced this issue Aug 12, 2023
* Add rule `statement-wrapping` to the `StandardRuleSetProvider` and remove `statement-wrapping` rule from release docs (`0.50`) as the rule is not run by Ktlint CLI

 Closes #2170

 Align names of Rule classes, file and `RULE_ID` constants

 Closes #2176

 Do not wrap a single line enum class

 Closes #2177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant