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

Cannot satisfy both paren-spacing and comment-spacing #653

Closed
pkubowicz opened this issue Nov 22, 2019 · 0 comments · Fixed by #664
Closed

Cannot satisfy both paren-spacing and comment-spacing #653

pkubowicz opened this issue Nov 22, 2019 · 0 comments · Fixed by #664

Comments

@pkubowicz
Copy link

pkubowicz commented Nov 22, 2019

Having file:

class WithParen {
    fun main() {
        System.out.println( // message below
                "A message"
        )
    }
}

there is no way to have both rule paren-spacing and comment-spacing satisfied:

% ./ktlint --version
0.35.0
% ./ktlint --verbose WithParen.kt
/home/pkubowicz/devel/bugs/ktlint-paren/WithParen.kt:3:28: Unexpected spacing after "(" (paren-spacing)

After removing space:

        System.out.println(// message below

you get:

% ./ktlint --verbose WithParen.kt
/home/pkubowicz/devel/bugs/ktlint-paren/WithParen.kt:3:28: Missing space before // (comment-spacing)

A similar issue affects CheckStyle: checkstyle/checkstyle#6371

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.

2 participants