Skip to content

Commit

Permalink
Merge branch 'feature/245_support_unknown_swiftLint_rules' into featu…
Browse files Browse the repository at this point in the history
…re/TBD1_245_integration_branch

* feature/245_support_unknown_swiftLint_rules:
  Idean#245 fixed bug that unknown rules led to an error. Now, unknown rules are ignored.
  • Loading branch information
MediaJunky committed Sep 1, 2019
2 parents 579d4d0 + 77bd610 commit 20904c7
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 20904c7

Please sign in to comment.