Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented May 7, 2025

The code inspection function for test data check has been modified as follows:

  • Since test data is not necessary after the else directive, it has been modified so that it is not subject to error highlighting.
  • Modified to recognize List type test data as well.

@xterao xterao added this to the 0.7.0 Release milestone May 7, 2025
@xterao xterao requested a review from Copilot May 7, 2025 01:30
@xterao xterao self-assigned this May 7, 2025
@xterao xterao added the bug Something isn't working label May 7, 2025
@xterao xterao linked an issue May 7, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refines the test data check behavior by excluding test data after certain directives and extending support to List-type test data.

  • Test data after else directives is no longer highlighted as an error.
  • Introduces regex-based matching for List type test data.
Files not reviewed (2)
  • src/test/testData/src/main/resources/META-INF/doma/example/dao/inspection/TestDataCheckDao/commentBlock.sql: Language not supported
  • src/test/testData/src/main/resources/META-INF/doma/example/dao/inspection/TestDataCheckDao/conditionAndLoopDirective.sql: Language not supported
Comments suppressed due to low confidence (1)

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

  • [nitpick] Consider renaming 'otherDirective' to a more descriptive name that clearly indicates its purpose, for example 'directiveAfterElse', to improve the code clarity.
val otherDirective =

@xterao xterao changed the title Fix/testdata check Fix/List type test data check and exclude else directive May 7, 2025
@xterao xterao changed the title Fix/List type test data check and exclude else directive List type test data check and exclude else directive May 7, 2025
@xterao xterao merged commit 77b52c2 into main May 7, 2025
3 checks passed
@xterao xterao deleted the fix/testdata-check branch May 7, 2025 02:04
@xterao xterao added the fix Bug fixes label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recognize List type as test data +Exclude else directive

2 participants