From b2c818b1be03cf6cc1c778f017dce42032166309 Mon Sep 17 00:00:00 2001 From: Ilia Permiashkin Date: Thu, 15 Jan 2026 19:42:12 +0000 Subject: [PATCH] [grazie] IJPL-225115 Proofreading Inspections not adhering to scope setting Merge-request: IJ-MR-188015 Merged-by: Ilia Permiashkin GitOrigin-RevId: 9519a253800683266d84be54eef9be441c85dd0a --- .../grazie/ide/inspection/grammar/GrazieInspection.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/grazie/src/main/kotlin/com/intellij/grazie/ide/inspection/grammar/GrazieInspection.kt b/plugins/grazie/src/main/kotlin/com/intellij/grazie/ide/inspection/grammar/GrazieInspection.kt index 6bc34aa13ecf..393262de3212 100644 --- a/plugins/grazie/src/main/kotlin/com/intellij/grazie/ide/inspection/grammar/GrazieInspection.kt +++ b/plugins/grazie/src/main/kotlin/com/intellij/grazie/ide/inspection/grammar/GrazieInspection.kt @@ -92,11 +92,12 @@ class GrazieInspection : LocalInspectionTool(), DumbAware { } private fun areDisabled(session: LocalInspectionToolSession): Boolean { - val project = session.file.project + val file = session.file + val project = file.project val profile = InspectionProfileManager.getInstance(project).currentProfile return inspections.all { inspection -> val tools = profile.getToolsOrNull(inspection.shortName, project) - tools == null || !tools.isEnabled + tools == null || !tools.isEnabled(file) } }