Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kotlin 如何抑制Detekt的通配符导入和匹配DeclarationName?_Kotlin_Detekt - Fatal编程技术网

Kotlin 如何抑制Detekt的通配符导入和匹配DeclarationName?

Kotlin 如何抑制Detekt的通配符导入和匹配DeclarationName?,kotlin,detekt,Kotlin,Detekt,我需要抑制两个错误:WildcardImport和MatchingDeclarationName。问题是需要将其应用于整个文件,有什么方法可以做到这一点吗?如果要在类上禁止detekt,可以将其放在类声明的顶部 @Suppress("WildcardImport","MatchingDeclarationName") class SampleClass 或者,如果要抑制整个文件,可以放置此注释 @file:Suppress("WildcardImport","MatchingDeclarati

我需要抑制两个错误:WildcardImport和MatchingDeclarationName。问题是需要将其应用于整个文件,有什么方法可以做到这一点吗?

如果要在类上禁止detekt,可以将其放在类声明的顶部

@Suppress("WildcardImport","MatchingDeclarationName")
class SampleClass
或者,如果要抑制整个文件,可以放置此注释

@file:Suppress("WildcardImport","MatchingDeclarationName")

如果要在类上禁止detekt,可以将其放在类声明的顶部

@Suppress("WildcardImport","MatchingDeclarationName")
class SampleClass
或者,如果要抑制整个文件,可以放置此注释

@file:Suppress("WildcardImport","MatchingDeclarationName")