Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[kotlin] [cpd] Added CPD support for Kotlin #1441
Before submitting a PR, please check that:
This is a pull request for the addition of Kotlin support for CPD. This does not include full PMD support, so it can only be used to check for code duplication.
@maikelsteneker thanks for the PR, this is going to make a lot of people happy!
If you could provide a sample kotlin source file and include a test case it would be great.
Once again, the pmd-go module is a nice example as to what we would expect for unit testing a new cpd-only language (version and tokenizer test).
Thanks in advanced!
I've taken most of your comments into account. Unfortunately, I wasn't able to use a TokenFilter, since the AntlrTokenizer doesn't seem to support it. I think adjusting it falls outside of the scope of this change, so I've worked around it for now.
Please let me know if additional changes should be made before merging. Thanks again for the feedback!