Skip to content

Commit a2dadbb

Browse files
committed
Merge remote-tracking branch 'origin/fix/testdata-check' into fix/testdata-check
2 parents 83eb751 + 83ca162 commit a2dadbb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ class SqlTestDataAfterBlockCommentVisitor(
9090
listOf("true", "false", "null").contains(element.text) ||
9191
element.text.matches(Regex("^\\d+$"))
9292

93+
/**
94+
* Determines if the given element matches the pattern for "List type test data."
95+
*
96+
* The function checks if the text of the element and its subsequent non-whitespace siblings
97+
* form a valid list enclosed in parentheses. The list can contain:
98+
* - Strings (double-quoted or single-quoted)
99+
* - Numbers (integers)
100+
* - Boolean values ("true" or "false")
101+
* - The "null" literal
102+
* These values can be separated by commas, and the entire list must be enclosed in parentheses.
103+
*/
93104
private fun isMatchListTestData(element: PsiElement): Boolean {
94105
val parenthesesListPattern =
95106
Regex(

0 commit comments

Comments
 (0)