aaschmid / gradle-cpd-plugin

Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Apache License 2.0
95 stars 12 forks source link

cpd can't handle the sign "`" #27

Closed contrudar closed 6 years ago

contrudar commented 6 years ago

Hello, I have Java and Kotlin code in one project. Everything worked well until the kotlin line was added: DialogEntity.ID.in(dialogIdList)) and i got this error Lexical error in file path\List101Database.kt at line 51, column 50. Encountered: "`" (96), after : ""

Can it be somehow fixed? thanks in advance

aaschmid commented 6 years ago

Hi @contrudar,

unfortunately CPD cannot handle Kotlin syntax. Can you just exclude the Kotlin source files using

tasks.withType(Cpd) {
    exclude "*.kt"
}

see also #22

contrudar commented 6 years ago

thx