Move implementation of runForWholeFile field to xml
This commit is contained in:
@@ -1751,6 +1751,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceCollectionCountWithSizeInspection"
|
||||
@@ -1976,6 +1977,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection"
|
||||
|
||||
@@ -1757,6 +1757,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceCollectionCountWithSizeInspection"
|
||||
@@ -1982,6 +1983,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection"
|
||||
|
||||
@@ -1757,6 +1757,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceCollectionCountWithSizeInspection"
|
||||
@@ -1982,6 +1983,7 @@
|
||||
enabledByDefault="false"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.refactoring.move.changePackage.PackageDirectoryMismatchInspection"
|
||||
|
||||
@@ -111,8 +111,6 @@ class KotlinUnusedImportInspection : AbstractKotlinInspection() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun runForWholeFile() = true
|
||||
|
||||
override fun checkFile(file: PsiFile, manager: InspectionManager, isOnTheFly: Boolean): Array<out ProblemDescriptor>? {
|
||||
if (file !is KtFile) return null
|
||||
val data = analyzeImports(file) ?: return null
|
||||
|
||||
@@ -38,8 +38,6 @@ class ReformatInspection : LocalInspectionTool() {
|
||||
@XmlAttribute
|
||||
var processChangedFilesOnly: Boolean = false
|
||||
|
||||
override fun runForWholeFile(): Boolean = true
|
||||
|
||||
override fun checkFile(file: PsiFile, manager: InspectionManager, isOnTheFly: Boolean): Array<out ProblemDescriptor>? {
|
||||
return checkFile(file, isOnTheFly)?.toTypedArray()
|
||||
}
|
||||
|
||||
@@ -198,8 +198,6 @@ class UnusedSymbolInspection : AbstractKotlinInspection() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun runForWholeFile() = true
|
||||
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean, session: LocalInspectionToolSession): PsiElementVisitor {
|
||||
return namedDeclarationVisitor(fun(declaration) {
|
||||
ProgressManager.checkCanceled()
|
||||
|
||||
-2
@@ -52,8 +52,6 @@ class KDocMissingDocumentationInspection : AbstractKotlinInspection() {
|
||||
|
||||
}
|
||||
|
||||
override fun runForWholeFile(): Boolean = true
|
||||
|
||||
class AddDocumentationFix : LocalQuickFix {
|
||||
override fun getName(): String = KotlinBundle.message("add.documentation.fix.text")
|
||||
|
||||
|
||||
@@ -110,8 +110,10 @@ class InspectionDescriptionTest : LightPlatformTestCase() {
|
||||
checkValue(failMessages, toolName, "suppressId", ep.id, ep.getShortName(), tool.id)
|
||||
checkValue(failMessages, toolName, "alternateId", ep.alternativeId, null, tool.alternativeID)
|
||||
checkValue(failMessages, toolName, "shortName", ep.getShortName(), null, tool.shortName)
|
||||
checkValue(failMessages, toolName, "runForWholeFile", null, "false", tool.runForWholeFile().toString())
|
||||
}
|
||||
}
|
||||
|
||||
UsefulTestCase.assertEmpty(StringUtil.join(failMessages, "\n"), failMessages)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user