Skip to content

Add [StringSyntax] attribute to RegExMatch (#3214)#4827

Merged
rockfordlhotka merged 1 commit into
mainfrom
rocky/3214-stringsyntaxattribute
Feb 16, 2026
Merged

Add [StringSyntax] attribute to RegExMatch (#3214)#4827
rockfordlhotka merged 1 commit into
mainfrom
rocky/3214-stringsyntaxattribute

Conversation

@rockfordlhotka

@rockfordlhotka rockfordlhotka commented Feb 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Annotate RegExMatch.Expression property and all constructor expression parameters with [StringSyntax(StringSyntaxAttribute.Regex)] so IDEs provide regex syntax highlighting and validation within string literals
  • Add reflection-based test verifying the [StringSyntax] attributes are present on the property and all constructor parameters
  • Add generator snapshot test (Case10) confirming user-applied attributes (e.g., [Description], [StringSyntax]) on partial properties compile correctly with the [CslaImplementProperties] generator
  • Fix flaky AsyncRuleException tests by replacing timing-based assertions with TaskCompletionSource signaling and increasing WaitAsync timeout from 150ms to 5s

Closes #3214

Test plan

  • RegExMatchHasStringSyntaxAttribute — verifies via reflection that [StringSyntax(Regex)] is on the Expression property and all 3 constructor expression parameters
  • Generator Case10 — verifies partial properties with user-applied attributes compile without duplicate attribute errors
  • AsyncRuleException_Testcase01 / Testcase02 — no longer flaky on CI
  • Full test suite passes (CI green)

🤖 Generated with Claude Code

…ghting

Annotate RegExMatch.Expression property and all constructor expression
parameters with [StringSyntax(Regex)] so IDEs provide syntax highlighting
and validation for regex string literals. Add reflection test verifying
the attributes are present, and a generator test confirming user-applied
attributes on partial properties compile correctly. Fix flaky async rule
exception tests by replacing timing-based assertions with TCS signaling.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@rockfordlhotka rockfordlhotka force-pushed the rocky/3214-stringsyntaxattribute branch from 3278900 to a326928 Compare February 16, 2026 20:54
@rockfordlhotka rockfordlhotka merged commit 4db2dd2 into main Feb 16, 2026
2 checks passed
@rockfordlhotka rockfordlhotka deleted the rocky/3214-stringsyntaxattribute branch February 16, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore whether the string format attribute is useful for csla

1 participant