-
Notifications
You must be signed in to change notification settings - Fork 503
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
ktlint 0.47.0 throwing error when using rules with prefix ij_kotlin #1627
Comments
Is it correct that you use the ktlint-gradle plugin? What version are you on? In this commit the plugin has updated the default ktlint version from 0.42.1 to 0.43.2. As some breaking changes have been introduced in ktlint 0.47.x the communication between the ktlint-gradle plugin and ktlint might no longer work as expected and result in problems. It would be very helpful if you could try to reproduce the problem with the KtLint CLI. If you can reproduce with KtLint CLI than please post a code example and the exact command that you execute. |
No, I'm using ktlint directly via gradle.
And then I call it via terminal |
There are a few possible causes for the problem. Please run both experiments below:
|
The issue is related to I tried to pass the absolute or the relative path of the Then I removed the Here is my current gradle integration that works.
|
Ok cool. Are you working on Windows OS? |
No, I'm in macOS |
…tting in the default ".editorconfig" Closes pinterest#1627
Would you mind testing the fix with the latest snapshot? See https://pinterest.github.io/ktlint/install/snapshot-build/ |
Hey, thanks for your help. |
Expected Behavior
I updated ktlint from version 0.46.1 to 0.47.0 and when using rules with prefix
ij_kotlin
it throws errors.Here is my
.editorconfig
file.With the previous versions it was working.
I have updated ktlint from version 0.46.1 to 0.47.0 and it started throwing the following exception.
If I downgrade ktlint from version 0.47.0 to 0.46.1 it works again.
Observed Behavior
It throws the following exception:
Steps to Reproduce
Use the following
.editorconfig
file.Run the following command on the terminal:
./gradlew ktlintFormat --daemon
Your Environment
.editorconfig
settingsThe text was updated successfully, but these errors were encountered: