I have a question regarding the kotlin implementation of S1172 (Unused function parameters should be removed):
Is it intentionally that public functions of classes do NOT raise an issue for unused parameters? (neither SonarLint nor SonarQube are raising issues)
if it is intentionally: should the documentation be adapted?
Or is this a bug?
fun nonClassFunction(unusedParam: String): String { // raises issue
return "value"
}
class UnusedFunctionsInClass {
private fun privateFunction(unusedParam: String): String { // raises issue
return "value"
}
fun publicFunction(unusedParam: String): String { // DOES NOT RAISE ISSUE
return "value"
}
}
Environment
- Operating system: Windows 10
- SonarLint plugin version: org.sonarlint.idea (10.8.1.79205)
- IntelliJ version:IntelliJ IDEA 2024.2.0.2 (Ultimate Edition)
- Programming language you’re coding in: JDK: 21 ; Kotlin: 2.0.20
- Is connected mode used: yes
- Connected to SonarCloud or SonarQube (and which version): SonarQube: Community EditionVersion 10.3 (build 82913)