Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Commas attached to preceding token #173

Closed
patrickpilch opened this issue Mar 12, 2018 · 2 comments
Closed

Commas attached to preceding token #173

patrickpilch opened this issue Mar 12, 2018 · 2 comments

Comments

@patrickpilch
Copy link

Android's Kotlin style guide's "Where to break" number #4 states:

A comma (,) stays attached to the token that precedes it.

It seems ktlint does not enforce this, so it allows potentially unwanted formatting like:

some.method(1 , 2)

Or

fun testMethod(
    arg1: Int ,
    arg2: Int
    ,

    arg3: Int
) = Unit

Version tested: 0.19.0

@shyiko
Copy link
Collaborator

shyiko commented Mar 12, 2018

Thanks Patrick. Yeah, SpacingAroundCommaRule is way to lax. I'll keep this ticket in mind when scoping for the next release.

@shyiko
Copy link
Collaborator

shyiko commented Mar 21, 2018

Fixed in 0.20.0.

@shyiko shyiko closed this as completed Mar 21, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants