We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be7347f commit 931ab48Copy full SHA for 931ab48
src/main/kotlin/org/domaframework/doma/intellij/inspection/ForDirectiveInspection.kt
@@ -218,6 +218,13 @@ class ForDirectiveInspection(
218
}
219
220
val stack = mutableListOf<BlockToken>()
221
+ val filterPosition = directiveBlocks.filter { it.position < targetElement.textOffset }
222
+ filterPosition.forEach { block ->
223
+ when (block.type) {
224
+ BlockType.FOR, BlockType.IF -> stack.add(block)
225
+ BlockType.END -> if (stack.isNotEmpty()) stack.removeAt(stack.lastIndex)
226
+ }
227
228
directiveBlocks.forEach { block ->
229
when (block.type) {
230
BlockType.FOR, BlockType.IF -> stack.add(block)
0 commit comments