github-actions[bot] on gh-pages
Update documentation https://g… (compare)
snippets
and another directory call repos
. I want CPD to find clones of the snippets
directory inside of the repos
directory and not report clones found within the snippets
directory or the repos
directory. Is this possible?
run.sh cpd --minimum-tokens 100 --files snippets --files repos --language py --format xml > cpd_results.xml
snippets
directory and the repos
directory. Instead, I want CPD to report only those clones found between snippets
and repos
addViolation
method from AbstractRule
. currently, I'm extending the AbstractJavaRule
base class and overriding the visit
method. this gets an Object data
parameter that I pass into addViolation
. perhaps I need to override another method to accomplish the same thing? any pointers would be appreciated
@Ayush-D That's a bit tricky, not sure if this is possible with XPath. It's certainly easier to write a Java-based rule.
So, this is, how you can find all methods, for which at least one other method exists with the same parameter count:
for $x in //MethodDeclaration
return if (count(//MethodDeclaration[@Arity = $x/@Arity]) > 1)
then $x
else ()
Hello. I am trying to build the pmd project in Windows computer by following https://github.com/pmd/pmd/blob/master/BUILDING.md.
But I am getting the following error: "[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project pmd-core: There are test failures."
Can anybody help me on what to do?
One of my students implemented a small tool around those metric classes and integrated it into a Jenkins plugin: https://github.com/jenkinsci/metrics-aggregation-plugin
Maybe you can use this code as a starting point.