Skip to content

Commit

Permalink
Idean#245 fixed bug that unknown rules led to an error. Now, unknown …
Browse files Browse the repository at this point in the history
…rules are ignored.
  • Loading branch information
MediaJunky committed Sep 1, 2019
1 parent 7ad1c40 commit 77bd610
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,18 @@ private void recordIssue(final String line) {
}

InputFile inputFile = context.fileSystem().inputFile(fp);
NewIssueLocation dil = new DefaultIssueLocation()
.on(inputFile)
.at(inputFile.selectLine(lineNum))
.message(message);
context.newIssue()
.forRule(RuleKey.of(SwiftLintRulesDefinition.REPOSITORY_KEY, ruleId))
.at(dil)
.save();
try {
NewIssueLocation dil = new DefaultIssueLocation()
.on(inputFile)
.at(inputFile.selectLine(lineNum))
.message(message);
context.newIssue()
.forRule(RuleKey.of(SwiftLintRulesDefinition.REPOSITORY_KEY, ruleId))
.at(dil)
.save();
} catch (Exception e) {
LOGGER.warn(e.getMessage());
}
}
}
}

0 comments on commit 77bd610

Please sign in to comment.