Make pmd language have a hook to launch CPD

This allows removing the CPD language instances,
sharing more logic between CPD and PMD, and using
language properties to configure CPD and PMD uniformly.
This commit is contained in:
Clément Fournier
2023-02-10 16:24:11 +01:00
parent eee8b95a68
commit d4c05d1fb5
39 changed files with 357 additions and 283 deletions

View File

@ -62,7 +62,7 @@ public class ScalaTokenizer implements Tokenizer {
}
@Override
public void tokenize(SourceCode sourceCode, Tokens tokenEntries) throws IOException {
public void tokenize(TextDocument sourceCode, Tokens tokenEntries) throws IOException {
try (TextDocument textDoc = TextDocument.create(CpdCompat.cpdCompat(sourceCode))) {