Skip to content

Commit dc0b794

Browse files
committed
Enhance SQL test data validation to support case-insensitive boolean values
1 parent f6d8682 commit dc0b794

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/main/kotlin/org/domaframework/doma/intellij/inspection/sql/visitor/SqlTestDataAfterBlockCommentVisitor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class SqlTestDataAfterBlockCommentVisitor(
105105
val parenthesesListPattern =
106106
Regex(
107107
"""^\(\s*(?:(?:"[^"]*"|'[^']*'|\d+|true|false|null)\s*(?:,\s*(?:"[^"]*"|'[^']*'|\d+|true|false|null)\s*)*)?\)$""",
108+
RegexOption.IGNORE_CASE,
108109
)
109110
val testDataText =
110111
element.nextLeafs

src/test/testData/src/main/resources/META-INF/doma/example/dao/inspection/TestDataCheckDao/commentBlock.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ SELECT e.employee_id AS employeeId
1010
WHERE e.employee_id = <error descr="Bind variables must be followed by test data">/*^ id */</error>
1111
AND e.age >= /*^ literalAge */99
1212
AND e.sub_id IN /* subIds */(1, 2, 3)
13+
AND e.sub_id IN /* subIds */(true, False, NULL)

0 commit comments

Comments
 (0)