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

OperatorUsageWhitespaceRule autocorrect breaks : 1.0E-6 #1233

Closed
MaximusMcCann opened this issue Jan 23, 2017 · 1 comment
Closed

OperatorUsageWhitespaceRule autocorrect breaks : 1.0E-6 #1233

MaximusMcCann opened this issue Jan 23, 2017 · 1 comment
Labels
duplicate Issues that already exist in other terms.

Comments

@MaximusMcCann
Copy link

MaximusMcCann commented Jan 23, 2017

1.0E-6 is a valid Double, but the autocorrect treats the '-' sign incorrectly and adds spaces before and after it. Would be nice to filter out [0-9][Ee][-][09]$ or w/e the regex should be. :)

code:

    let eps: Double = 1.0E-6

gets auto corrected to:

    let eps: Double = 1.0E - 6

which yields
image

version 0.16.0

current solution:

    // swiftlint:disable:next operator_usage_whitespace
    let eps: Double = 1.0E-6
@marcelofabri marcelofabri added bug Unexpected and reproducible misbehavior. repro-needed Issues that cannot be reproduced or miss proper descriptive examples. labels Jan 23, 2017
@marcelofabri
Copy link
Collaborator

This is a duplicate of #1153 and was fixed on 0.16.1.

@marcelofabri marcelofabri added duplicate Issues that already exist in other terms. and removed bug Unexpected and reproducible misbehavior. repro-needed Issues that cannot be reproduced or miss proper descriptive examples. labels Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues that already exist in other terms.
Projects
None yet
Development

No branches or pull requests

2 participants