Skip to content

Commit 73f15eb

Browse files
committed
SONARKT-258 Logged message at INFO level during incremental analysis should be concise
1 parent 4dc11b9 commit 73f15eb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

sonar-kotlin-plugin/src/main/java/org/sonarsource/kotlin/plugin/KotlinSensor.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ class KotlinSensor(
9898
totalFiles++
9999
it.status() != InputFile.Status.SAME
100100
}.also {
101-
LOG.info(
102-
"The Kotlin analyzer will analyze ${it.size} out of $totalFiles files. " +
103-
"All others, if any, can be skipped without impacting analysis results."
104-
)
101+
LOG.info("Only analyzing ${it.size} changed Kotlin files out of ${totalFiles}.")
105102
}
106103
} else {
107104
LOG.debug("The Kotlin analyzer is running in a context where unchanged files cannot be skipped.")

sonar-kotlin-plugin/src/test/java/org/sonarsource/kotlin/plugin/KotlinSensorTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,7 @@ internal class KotlinSensorTest : AbstractSensorTest() {
559559
assertThat(logTester.logs(LoggerLevel.DEBUG))
560560
.contains("The Kotlin analyzer is running in a context where it can skip unchanged files.")
561561
assertThat(logTester.logs(LoggerLevel.INFO))
562-
.contains(
563-
"The Kotlin analyzer will analyze 2 out of 3 files. All others, if any, can be skipped without impacting analysis results."
564-
)
562+
.contains("Only analyzing 2 changed Kotlin files out of 3.")
565563
}
566564

567565
private fun assertAnalysisIsNotIncremental() {

0 commit comments

Comments
 (0)