csv 使用Java、JGit、PMD进行静态代码分析

rn0zuynd  于 12个月前  发布在  Java
关注(0)|答案(1)|浏览(198)

我正在尝试从github克隆仓库,做本地克隆,并对java源代码进行静态代码分析。最后将结果写入CSV文件。

Exception in thread "main" java.lang.StackOverflowError
    at java.base/java.lang.String.indexOf(String.java:2401)
    at java.base/java.net.URLStreamHandler.parseURL(URLStreamHandler.java:157)
    at java.base/sun.net.www.protocol.file.Handler.parseURL(Handler.java:56)
    at java.base/java.net.URL.<init>(URL.java:801)
    at java.base/java.net.URL.<init>(URL.java:654)
    at java.base/jdk.internal.loader.URLClassPath$FileLoader.getResource(URLClassPath.java:1091)
    at java.base/jdk.internal.loader.URLClassPath$FileLoader.findResource(URLClassPath.java:1079)
    at java.base/jdk.internal.loader.URLClassPath$1.next(URLClassPath.java:343)
    at java.base/jdk.internal.loader.URLClassPath$1.hasMoreElements(URLClassPath.java:353)
    at java.base/jdk.internal.loader.BuiltinClassLoader$1.hasNext(BuiltinClassLoader.java:408)
    at java.base/jdk.internal.loader.BuiltinClassLoader$1.hasMoreElements(BuiltinClassLoader.java:416)
    at java.base/java.lang.CompoundEnumeration.next(ClassLoader.java:2756)
    at java.base/java.lang.CompoundEnumeration.hasMoreElements(ClassLoader.java:2765)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1210)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
    at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
    at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
    at java.xml/javax.xml.parsers.FactoryFinder$1.run(FactoryFinder.java:255)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
    at java.xml/javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:251)
    at java.xml/javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:228)
    at java.xml/javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:172)
    at net.sourceforge.pmd.RuleSetFactory.createDocumentBuilder(RuleSetFactory.java:444)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:366)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:409)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:234)
    at net.sourceforge.pmd.RuleSetFactory.createRuleSet(RuleSetFactory.java:229)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleSetReferenceNode(RuleSetFactory.java:549)
    at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:503)
Process finished with exit code 1

字符串
我正在使用JGit运行静态代码分析,PMD并试图将这些结果写入CSV文件。但是,我不断收到此错误。我不确定这个问题到底是什么。我已经尝试更改自定义-ruleset.xml。

这是我的custom-ruleset.xml。

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Combined Ruleset"
         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.net/ruleset_2_0_0.xsd">

    <description>
        Combined ruleset including custom ruleset and others.
    </description>

    <!-- Reference the custom ruleset using relative path -->
    <rule ref="./custom-ruleset.xml"/>

    <!-- Additional rules -->
    <rule ref="category/java/bestpractices.xml/AvoidUnusedPrivateFields"/>

</ruleset>

xghobddn

xghobddn1#

啊.我明白了。堆栈跟踪表明在加载一个规则集时有无限递归。而且.
这是有道理的。文件包含这一行:

<!-- Reference the custom ruleset using relative path -->
<rule ref="./custom-ruleset.xml"/>

字符串
这实际上是告诉加载器加载“./custom-ruleset.xml”。但那是this file。换句话说,你正在递归地加载你的文件。
这是你规则中的一个错误。

相关问题