Skip to content

Add ktlint rule ID in formatter callback exception#1279

Merged
nedtwigg merged 6 commits intodiffplug:mainfrom
smpanaro:ktlint-rule-id
Aug 22, 2022
Merged

Add ktlint rule ID in formatter callback exception#1279
nedtwigg merged 6 commits intodiffplug:mainfrom
smpanaro:ktlint-rule-id

Conversation

@smpanaro
Copy link
Copy Markdown
Contributor

@smpanaro smpanaro commented Aug 19, 2022

When ktlint fails to autocorrect an issue, you get an error:

Step 'ktlint' found problem in 'src/main/java/Main.kt':
Error on line: 337, column: 41
Unexpected whitespace
// stacktrace

This adds the rule to the error:

Step 'ktlint' found problem in 'src/main/java/Main.kt':
Error on line: 337, column: 41
rule: experimental:parameter-list-spacing
Unexpected whitespace
// stacktrace

@nedtwigg
Copy link
Copy Markdown
Member

Happy to merge if you fix broken tests :)

@smpanaro
Copy link
Copy Markdown
Contributor Author

Of course! I also made a small change to put the word rule: in front of the rule.

@nedtwigg nedtwigg merged commit 99950e7 into diffplug:main Aug 22, 2022
@nedtwigg
Copy link
Copy Markdown
Member

Published in plugin-gradle 6.10.0 and plugin-maven 2.25.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants