Merge branch 'pmd/7.0.x' into pmd7-pr-4214
This commit is contained in:
1 file changed
+8
-1
@@ -4,6 +4,8 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.apex.ast;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -60,6 +62,11 @@ public final class ASTApexFile extends AbstractApexNode<AstNode> implements Root
|
||||
}
|
||||
|
||||
public List<Issue> getGlobalIssues() {
|
||||
return multifileAnalysis.getFileIssues(getAstInfo().getTextDocument().getPathId());
|
||||
String filename = getAstInfo().getTextDocument().getPathId();
|
||||
if (filename.length() > 7 && "file://".equalsIgnoreCase(filename.substring(0, 7))) {
|
||||
URI uri = URI.create(filename);
|
||||
filename = Paths.get(uri).toString();
|
||||
}
|
||||
return multifileAnalysis.getFileIssues(filename);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user