Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface InputFileContext {
gap: Double?,
)

fun reportAnalysisParseError(repositoryKey: String?, inputFile: InputFile, location: TextPointer?)
fun reportAnalysisParseError(repositoryKey: String, inputFile: InputFile, location: TextPointer?)

fun reportAnalysisError(message: String?, location: TextPointer?)
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.jetbrains.kotlin.psi.KtValueArgument
import org.jetbrains.kotlin.psi.psiUtil.endOffset
import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.sonar.api.batch.fs.InputFile
import org.sonar.api.batch.fs.TextPointer
import org.sonar.api.batch.fs.TextRange
import org.sonarsource.kotlin.converter.KotlinTextRanges.textPointerAtOffset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class InputFileContextImpl(
}
}

override fun reportAnalysisParseError(repositoryKey: String?, inputFile: InputFile, location: TextPointer?) {
override fun reportAnalysisParseError(repositoryKey: String, inputFile: InputFile, location: TextPointer?) {
reportAnalysisError("Unable to parse file: $inputFile", location)

val parsingErrorRuleKey = RuleKey.of(repositoryKey, PARSING_ERROR_RULE_KEY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DummyInputFileContext : InputFileContext {
issuesReported.add(ReportedIssue(ruleKey, textRange, message, secondaryLocations, gap))
}

override fun reportAnalysisParseError(repositoryKey: String?, inputFile: InputFile, location: TextPointer?) {
override fun reportAnalysisParseError(repositoryKey: String, inputFile: InputFile, location: TextPointer?) {
throw NotImplementedError()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void shouldHaveErrorsAndFailures() throws XMLStreamException {

// error
UnitTestResult error = report.getResults().get(1);
assertThat(error.getDurationMilliseconds()).isEqualTo(0L);
assertThat(error.getDurationMilliseconds()).isZero();
assertThat(error.getStatus()).isEqualTo(UnitTestResult.STATUS_ERROR);
assertThat(error.getName()).isEqualTo("testTwo");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void shouldHaveEmptyReport() {
assertThat(report.getResults().size()).isZero();
assertThat(report.getSkipped()).isZero();
assertThat(report.getTests()).isZero();
assertThat(report.getDurationMilliseconds()).isEqualTo(0L);
assertThat(report.getDurationMilliseconds()).isZero();
assertThat(report.getErrors()).isZero();
assertThat(report.getFailures()).isZero();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ internal class TestContext(
})
}

override fun reportAnalysisParseError(repositoryKey: String?, inputFile: InputFile, location: TextPointer?) {
override fun reportAnalysisParseError(repositoryKey: String, inputFile: InputFile, location: TextPointer?) {
throw NotImplementedError()
}

Expand Down