Fix warnings in stdlib/compiler/plugins/test code

This commit is contained in:
Alexander Udalov
2020-11-26 21:25:01 +01:00
parent b3d85e656e
commit 221f44da5f
48 changed files with 109 additions and 101 deletions
@@ -31,7 +31,7 @@ class SpecTestsConsistencyTest : TestCase() {
@com.intellij.testFramework.Parameterized.Parameters(name = "{0}")
@JvmStatic
fun getTestFiles(klass: Class<*>): List<Array<String>> {
fun getTestFiles(@Suppress("UNUSED_PARAMETER") klass: Class<*>): List<Array<String>> {
val testFiles = mutableListOf<Array<String>>()
TestArea.values().forEach { testArea ->
@@ -58,10 +58,10 @@ fun notLinkedSpecTestsPrint() {
}
}
fun main(args: Array<String>) {
fun main() {
println("==================================================")
linkedSpecTestsPrint()
println("==================================================")
notLinkedSpecTestsPrint()
println("==================================================")
}
}
@@ -52,7 +52,7 @@ class DiagnosticTestTypeValidator(
private fun collectDiagnostics(files: List<BaseDiagnosticsTest.TestFile>) {
files.forEach { file ->
file.actualDiagnostics.forEach {
val diagnosticName = it.diagnostic.factory.name!!
val diagnosticName = it.diagnostic.factory.name
diagnosticStats.run { put(diagnosticName, getOrDefault(diagnosticName, 0) + 1) }
diagnostics.add(it.diagnostic)
}
@@ -68,4 +68,4 @@ class DiagnosticTestTypeValidator(
val diagnostics = if (diagnosticStats.isNotEmpty()) "$diagnosticSeverityStats | $diagnosticStats" else "does not contain"
println("DIAGNOSTICS: $diagnostics")
}
}
}