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

When braces are added to if and there is a comment on the same line, brace is added to the comment #483

Closed
petertrr opened this issue Nov 2, 2020 · 0 comments · Fixed by #540
Assignees
Labels
autofix Issues related to diktat in autofix mode bug Something isn't working

Comments

@petertrr
Copy link
Member

petertrr commented Nov 2, 2020

Describe the bug

fun foo() {
    if (condition) // comment
        foo()
}

is corrected into

fun foo() {
    if (condition)  // comment {
        foo()
    }
}

Environment information

  • diktat version: 0.1.3
@petertrr petertrr added the bug Something isn't working label Nov 2, 2020
@kentr0w kentr0w self-assigned this Nov 17, 2020
@petertrr petertrr added the autofix Issues related to diktat in autofix mode label Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix Issues related to diktat in autofix mode bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants