Skip to content

Commit 05b0d88

Browse files
committed
Fix: Added a flag to run code inspections across files when modifying SQL.
1 parent 22734c3 commit 05b0d88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/domaframework/doma/intellij/inspection/sql/inspector/SqlBindVariableValidInspector.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ class SqlBindVariableValidInspector : LocalInspectionTool() {
8484
END,
8585
}
8686

87+
override fun runForWholeFile(): Boolean = true
88+
8789
override fun buildVisitor(
8890
holder: ProblemsHolder,
8991
isOnTheFly: Boolean,
9092
): SqlVisitor {
91-
val topElm = holder.file.firstChild
93+
val topElm = holder.file.firstChild ?: return object : SqlVisitor() {}
9294
val directiveBlocks =
9395
topElm.nextLeafs
9496
.filter { elm ->

0 commit comments

Comments
 (0)