[grazie] IJPL-225115 Proofreading Inspections not adhering to scope setting

Merge-request: IJ-MR-188015
Merged-by: Ilia Permiashkin <ilia.permiashkin@jetbrains.com>

GitOrigin-RevId: 9519a253800683266d84be54eef9be441c85dd0a
This commit is contained in:
Ilia Permiashkin
2026-01-15 19:42:12 +00:00
committed by intellij-monorepo-bot
parent af86838d78
commit b2c818b1be
@@ -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)
}
}