Skip to content

Colon rules acting differently for same situation. (+ custom question) #730

Closed
@freak4pc

Description

Hey There :)

In many places in my code I prefer having my colons attached to the identifier, but not with a single space to the type. I think this requires a custom rule (Something like identifier(no spaces):(multiple spaces)type), but I'm still not fluent enough in Swiftlint to write this rule

The odd part is the current rule seems picky on this and sometimes lets these kind of statements pass... I'm not sure what's the difference between the first line that wasn't detected as a "warning" to the other two, which are.

screen shot 2016-07-25 at 11 38 05 am

Also, if you could guide me on how to write a rule that will allow the following detection (meaning disabled colon_rules and writing something custom that allows multiple spaces after the colon) I'd be happy to read up on it.

Thank you!

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected and reproducible misbehavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions