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

Detecting version of Swift #703

Closed
norio-nomura opened this issue Jun 21, 2016 · 5 comments
Closed

Detecting version of Swift #703

norio-nomura opened this issue Jun 21, 2016 · 5 comments

Comments

@norio-nomura
Copy link
Collaborator

I think following behaviors are usable:

$ TOOLCHAINS=com.apple.dt.toolchain.Swift_2_3 sourcekitten syntax --text "#sourceLocation()"
[
  {
    "offset" : 1,
    "length" : 14,
    "type" : "source.lang.swift.syntaxtype.identifier"
  }
]
$ TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault sourcekitten syntax --text "#sourceLocation()"
[
  {
    "offset" : 0,
    "length" : 15,
    "type" : "source.lang.swift.syntaxtype.keyword"
  }
@norio-nomura
Copy link
Collaborator Author

norio-nomura commented Jun 21, 2016

We can implement disabling rules that are needless on Swift 3 such as #701

@norio-nomura
Copy link
Collaborator Author

Are there any rules that we should disable on Swift 3 other than conditional_binding_cascade ?

@norio-nomura
Copy link
Collaborator Author

related to #700

@AliSoftware
Copy link
Contributor

AliSoftware commented Nov 29, 2016

The rule telling the enum cases to be TitleCamelCased (instead of lowerCamelCased) is probably concerned too (type_name iirc). Wouldn't completely disable it though, just amend it to not consider case foo to be concerned by type_name (as a case is considered an instance property, and not a type, by the Swift 3 naming conventions)

@marcelofabri
Copy link
Collaborator

This was implemented on #1081. Thanks @norio-nomura for finding these behaviors!

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

No branches or pull requests

3 participants