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

Crash When Linting File #1031

Closed
72A12F4E opened this issue Dec 22, 2016 · 3 comments
Closed

Crash When Linting File #1031

72A12F4E opened this issue Dec 22, 2016 · 3 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@72A12F4E
Copy link

72A12F4E commented Dec 22, 2016

When I run SwiftLint against my project, I get the following error.

Showing All Messages
2016-12-22 10:06:44.439 swiftlint[58376:383778] *** -[__NSCFString substringWithRange:]: Range {2554, 18446744073709551614} out of bounds; string length 6539. This will become an exception for apps linked after 10.10 and iOS 8. Warning shown once per app execution.

This error only appears to happen after I build my project for a 2nd time. If I clean the entire project then build, this error does not occur.

This happens immediately when it starts linting a particular file in my project. I am unable to share the file, but I can give some metadata about the file

[me@mac]~ $ wc badFile.swift
     201     478    6539

I am using SwiftLint version 0.14.0

@marcelofabri
Copy link
Collaborator

This seems to be a duplicate of #921.

Can you try disabling trailing_comma to see if it stops crashing?

@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Dec 22, 2016
@72A12F4E
Copy link
Author

Disabling the trailing_comma rule seems to fix the crash. Thanks!

@marcelofabri
Copy link
Collaborator

I'll close this so we can focus the discussion on #921 then. If you could try to reduce the file so a sample example, that'd be awesome.

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