I'm currently trying out PMD as a possible static analysis tool that our company can use. I've analyzed Java files with no problems whatsoever, but I couldn't seem to do it with Javascript, everytime I execute pmd:pmd it just analyses java files again. Anyways, here is a snippet of my POM.xml:
*Using Maven 3.3.1
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<sources>
${basedir}/src/main/webapp/js
</sources>
</configuration>
<executions>
<execution>
<goals>
<goal>add-source</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.7</version>
<configuration>
<language>javascript</language>
<rulesets>
<ruleset>ecmascript-basic</ruleset>
<ruleset>ecmascript-braces</ruleset>
<ruleset>ecmascript-unnecessary</ruleset>
</rulesets>
<includes>
<include>**/*.js</include>
</includes>
</configuration>
</plugin>
</plugins>
</reporting>
So I just followed the instructions indicated in this but can't seem to make it work. Can you guys please tell me if I'm missing some required setups / configurations ? TIA.