mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[jvm-inspections] Fix EmptyMethod compatibility with Kotlin
1. Fix suppression handling for Kotlin in global inspections
2. Fix RefMethodImpl#hasBody for top-level Kotlin functions
3. Move to JVM module
4. Add Kotlin tests
Fixes IDEA-330737 @file:Suppress("EmptyMethod") does not work
GitOrigin-RevId: 83f383e06754f510b6a99e35751263017734bb26
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c6e9c60193
commit
0385834f13
@@ -0,0 +1,20 @@
|
||||
package com.intellij.codeInspection.tests.kotlin
|
||||
|
||||
import com.intellij.codeInspection.emptyMethod.EmptyMethodInspection
|
||||
import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper
|
||||
import com.intellij.jvm.analysis.KotlinJvmAnalysisTestUtil
|
||||
import com.intellij.jvm.analysis.internal.testFramework.JvmSdkInspectionTestBase
|
||||
import com.intellij.testFramework.TestDataPath
|
||||
|
||||
private const val inspectionPath = "/codeInspection/emptyMethod"
|
||||
|
||||
@TestDataPath("\$CONTENT_ROOT/testData$inspectionPath")
|
||||
class KotlinEmptyMethodInspectionTest : JvmSdkInspectionTestBase() {
|
||||
override var inspection = EmptyMethodInspection()
|
||||
|
||||
override fun getBasePath() = KotlinJvmAnalysisTestUtil.TEST_DATA_PROJECT_RELATIVE_BASE_PATH + inspectionPath
|
||||
|
||||
fun `test basic`() {
|
||||
myFixture.testInspection("basic", GlobalInspectionToolWrapper(inspection))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user