SonarLint - Showing S1186 falsely in Intellij IDEA

Code:

 suspend fun tokenCheck(message: Message): String? {
     return readConfigSafe<AuthConfig>(ConfigType.AUTH, true)?.let {
         it.githubToken
     } ?: run {
         message.error("Github Token not found!")
         null
     }
 }

This is entirely incorrect and isn’t empty at all

Ah. I see unused methods count as “empty” for some reason?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.