Skip to content

Commit

Permalink
Fix duplicate filename var
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierson Yieh committed Apr 23, 2024
1 parent 9c22dc5 commit 238b308
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/edu/hm/hafner/coverage/parser/GoParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ protected ModuleNode parseReport(Reader reader, String fileName, FilteredLog log

String s = split[pkgIndxEnd];
String[] split2 = s.split("[:,]");
String fileName = split2[0];
String file = split2[0];
String filePath;
if (pkg != null && !pkg.isBlank()) {
filePath = String.join("/", pkg, fileName);
filePath = String.join("/", pkg, file);
} else {
filePath = fileName;
filePath = file;
}
FileNode fNode = meta.getOrAddFile(fileName, filePath);
FileNode fNode = meta.getOrAddFile(file, filePath);
addChildHelper(pNode, fNode);

String[] start = split2[1].split("\\.");
Expand Down

0 comments on commit 238b308

Please sign in to comment.