Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanChristopheMorinPerso committed Mar 2, 2019
1 parent 1845834 commit 6c12eb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/edu/hm/hafner/analysis/parser/PyLintParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@ protected Optional<Issue> createIssue(final Matcher matcher, final IssueBuilder
if (moduleName != null) {
if (moduleName.contains(".")) {
builder.setPackageName(moduleName.substring(0, moduleName.lastIndexOf(".")));
} else {
builder.setPackageName("-");
}
builder.setModuleName(moduleName);
} else {
builder.setPackageName("-")
.setModuleName("-");
}

return builder.setFileName(matcher.group("path"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void shouldParseReportWithoutSymbol() {
.hasCategory("W0611")
.hasSeverity(Severity.WARNING_NORMAL)
.hasModuleName("module_name_no_package")
.hasPackageName(null);
.hasPackageName("-");
});
}

Expand Down

0 comments on commit 6c12eb1

Please sign in to comment.