[
https://issues.apache.org/jira/browse/MPMD-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17188191#comment-17188191
]
Andreas Dangel commented on MPMD-290:
-------------------------------------
As documented here
[https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html#language|https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html#language]:
{quote}
Valid values are currently java, javascript or jsp.
{quote}
Looking at the code, I don't see a reason, why it shouldn't work with other
languages. The language is used here:
https://github.com/apache/maven-pmd-plugin/blob/829ea8e4292d50153158df8a93794025b62edfca/src/main/java/org/apache/maven/plugins/pmd/CpdReport.java#L284
Have you tried to set the language to "cs" (that's the language code for c# for
CPD)?
How does your pom.xml look like? Did you also configure the
[includes|https://maven.apache.org/plugins/maven-pmd-plugin/cpd-mojo.html#includes]
property? It defaults do "**/*.java", so by default doesn't consider any
"**/*.cs" files...
I'll try to add a integration test, to verify whether this works or doesn't
work....
> CPD ignores the specified language
> ----------------------------------
>
> Key: MPMD-290
> URL: https://issues.apache.org/jira/browse/MPMD-290
> Project: Maven PMD Plugin
> Issue Type: Bug
> Components: CPD
> Affects Versions: 3.12.0
> Reporter: QualiteSys QualiteSys
> Priority: Major
>
> I wish to analyze C# source code with CPD, with no success
> Looking to the CpdReport.java MOJO, it seams that the language is not
> extracted from either the pom.xml file or the CLI options.
> Line 76 :
> @Parameter( defaultValue = "java" )
> private String language;
> property = "language" is missing, so the language is always forced to java
> Is it possible to fix this bug, and add the missing languages CPD is
> supporting ?
> Thanks
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)