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

legacy_constructor autocorrect doesn't correct all cases #2098

Closed
fbarraganef opened this issue Mar 15, 2018 · 0 comments
Closed

legacy_constructor autocorrect doesn't correct all cases #2098

fbarraganef opened this issue Mar 15, 2018 · 0 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@fbarraganef
Copy link

New Issue Checklist

Bug Report

When I execute the swiftlint command, It show me the detected errors and when I execute the swiftlint autocorrect it show that all found errors were corrected, but when I open the file again the issue is persisting.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Done linting! Found 10 violations, 0 serious in 146 files.

swiftlint autocorrect 
Done correcting 146 files!

Environment

  • SwiftLint version (run swiftlint version to be sure)?
    0.25.0

  • Installation method used (Homebrew, CocoaPods, building from source, etc)?
    homebrew

  • Are you using nested configurations?
    NO

  • Which Xcode version are you using (check xcode-select -p)? 9.2

// This triggers a violation:
static func strikePrice(value: String) -> NSAttributedString { let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: value) attributeString.addAttribute(NSBaselineOffsetAttributeName, value: 0, range: NSMakeRange(0, attributeString.length)) attributeString.addAttribute(NSStrikethroughStyleAttributeName, value: 1, range: NSMakeRange(0, attributeString.length)) return attributeString }
@marcelofabri marcelofabri changed the title swiftlint autocorrect is not working properly legacy_constructor autocorrect doesn't correct all cases Mar 18, 2018
@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants