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

[swift] Swift 5 (up to 5.2) support for CPD #2473

Closed
kenji21 opened this issue May 7, 2020 · 1 comment · Fixed by #2475
Closed

[swift] Swift 5 (up to 5.2) support for CPD #2473

kenji21 opened this issue May 7, 2020 · 1 comment · Fixed by #2475
Labels
an:enhancement An improvement on existing features / rules has:pr The issue is already tackled in a PR
Milestone

Comments

@kenji21
Copy link
Contributor

kenji21 commented May 7, 2020

Is your feature request related to a problem? Please describe.
Combine (and SwiftUI) use property wrapper introduced within Swift 5.1, but cpd doesn't parse them well. Our CI is now failing due to this

Describe the solution you'd like
I will make an PR for Swift 5.x support

Describe alternatives you've considered
none

Additional context
Already made one for Swift 4 : #778

Reproduced the issue:

[ERROR] tokenizeTest[1](net.sourceforge.pmd.cpd.SwiftTokenizerTest)  Time elapsed: 0.004 s  <<< ERROR!
net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file Swift5.1.swift at line 15, column 22.  Encountered: token recognition error at: '$t'
	at net.sourceforge.pmd.cpd.SwiftTokenizerTest.tokenizeTest(SwiftTokenizerTest.java:57)
@kenji21 kenji21 added the an:enhancement An improvement on existing features / rules label May 7, 2020
@oowekyala oowekyala changed the title Swift 5 (up to 5.2) support [swift] Swift 5 (up to 5.2) support for CPD May 13, 2020
@adangel adangel added the has:pr The issue is already tackled in a PR label May 14, 2020
@adangel adangel added this to the 6.24.0 milestone May 14, 2020
@kenji21
Copy link
Contributor Author

kenji21 commented May 19, 2020

Nice, swift 5.3 is “frozen", maybe i'll PR again if there are significant syntax changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules has:pr The issue is already tackled in a PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants