diff --git a/swiftlang/src/main/java/com/backelite/sonarqube/swift/issues/swiftlint/SwiftLintReportParser.java b/swiftlang/src/main/java/com/backelite/sonarqube/swift/issues/swiftlint/SwiftLintReportParser.java index 14bc9b98..a5aa9db5 100644 --- a/swiftlang/src/main/java/com/backelite/sonarqube/swift/issues/swiftlint/SwiftLintReportParser.java +++ b/swiftlang/src/main/java/com/backelite/sonarqube/swift/issues/swiftlint/SwiftLintReportParser.java @@ -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()); + } } } }