Skip to content

Commit

Permalink
bugfix/suppress-bug(#372)
Browse files Browse the repository at this point in the history
### What's done:
  * Fixed bug
  • Loading branch information
aktsay6 committed Oct 6, 2020
1 parent 36c4ca4 commit 6ff8851
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ fun ASTNode.hasSuppress(warningName: String): Boolean {
?.any {
it.shortName.toString() == Suppress::class.simpleName
&& it.valueArgumentList?.arguments
?.firstOrNull()?.text?.trim('"', ' ').equals(warningName) ?: false
?.any { annotationName -> annotationName.text.trim('"', ' ') == warningName }
?: false
} ?: false
}, strict = false) != null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ class SuppressTest : LintTestBase(::IdentifierNaming) {
fun `test suppress on class`() {
val code =
"""
@Suppress("FUNCTION_NAME_INCORRECT_CASE")
@Suppress("FUNCTION_NAME_INCORRECT_CASE", "BACKTICKS_PROHIBITED")
class SomeClass {
fun /* */ methODTREE(): String {
}
fun `some`() {}
}
""".trimIndent()
lintMethod(code)
Expand Down

0 comments on commit 6ff8851

Please sign in to comment.