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

Xcode 10 complains about String extensions #22

Closed
dkalinai opened this issue Jun 5, 2018 · 6 comments
Closed

Xcode 10 complains about String extensions #22

dkalinai opened this issue Jun 5, 2018 · 6 comments

Comments

@dkalinai
Copy link

dkalinai commented Jun 5, 2018

Seems like Xcode 10 with newer swift version complains about the following code:

public enum AllowedCharacters {
case numeric
case alphabetic
case alphaNumeric
case allCharactersIn(String). // Identifier Name Violation: Enum element name should only contain alphanumeric characters: 'allCharactersIn(_:)' (identifier_name)
}

resulting in not working:

case .allCharactersIn(let allowedCharactersString):
return allowedCharactersString
}
}()

@Jeehut
Copy link
Member

Jeehut commented Jun 5, 2018

I'll have a look very soon and make a branch named xcode-10 which you will be able to use, probably in the next few hours. Stay tuned.

@dkalinai
Copy link
Author

dkalinai commented Jun 5, 2018

Sure thing, let me know how I can help you in testing. Etc.

@Jeehut
Copy link
Member

Jeehut commented Jun 5, 2018

Okay, I have just tried building the project and saw the same issue. But this is actually a SwiftLint related one and SwiftLint doesn't even run when this project is included via Carthage. How are you including it? Via CocoaPods without frameworks? Or manually somehow?

@dkalinai
Copy link
Author

dkalinai commented Jun 5, 2018

I am trying to build it manually. The CSVImporter that uses HandySwift complains that HandySwift is not built with latest swift code. Thus taking me back to HandySwift project and when building manually i encounter this error. however I have realised that my problem came from not running the workspace and a single project, now it works fine. :)

@Jeehut
Copy link
Member

Jeehut commented Jun 5, 2018

Please be aware that "not built with the latest swift code" usually can be solved by changing your toolchain to that of Xcode 10 and then, well, rebuilding your dependencies. But if you worked it out somehow differently, that's good, too. Btw this is a false positive on SwiftLint, so I reported it there. Closing this one then. I'll probably still do a Xcode 10 branch soon to elaborate what we should change.

@Jeehut Jeehut closed this as completed Jun 5, 2018
@mthole-old
Copy link

If anyone else is still running into this after upgrading to 0.27, try deleting your Pods/SwiftLint directory and reinstalling via pod install. That fixed the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants