-
Notifications
You must be signed in to change notification settings - Fork 510
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
[1.3.0] Running -format
adds extra spaces to class & function definition
#2688
Comments
Tnx for reporting. This problem is present since Ktlint version
It works fine in version
|
Huh, interesting 😅 I started observing this only when upgrading to |
Maybe it is caused by promoting sone experimental rules to standard. If your smoke test runs with non-experimental only this could explain the issue. |
After some more investigation, it turns out that the problem is caused by moving the Disabling that rule, results in the expected code:
results in the expected code:
It is not clear to me why you smoketest did not fail with previous Anyways, it is still a bug to be resolved. |
…mposite node In such cases insert the whitespace just before or after the composite element (recursively if needed) Closes #2688
…mposite node In such cases insert the whitespace just before or after the composite element (recursively if needed) Closes #2688
Expected Behavior
Running
format
with autoCorrect produces valid codestyleObserved Behavior
Running
check
after successfulformat
failsSteps to Reproduce
Given the following snippet:
runing
ktlint -F
produces:(notice the double spaces before
{
)which then fails on regular ktlint run with
Your Environment
.editorconfig
settingsThe text was updated successfully, but these errors were encountered: