Skip to content

Fix ValidIdentifierHelper.IsValidIdentifier accepting @ as valid#2040

Merged
twsouthwick merged 2 commits intodotnet:mainfrom
SimonCropp:Fix-ValidIdentifierHelper.IsValidIdentifier-accepting-@-as-valid
Apr 28, 2026
Merged

Fix ValidIdentifierHelper.IsValidIdentifier accepting @ as valid#2040
twsouthwick merged 2 commits intodotnet:mainfrom
SimonCropp:Fix-ValidIdentifierHelper.IsValidIdentifier-accepting-@-as-valid

Conversation

@SimonCropp
Copy link
Copy Markdown
Contributor

The else branch stripped the '@' prefix via Substring(1) but never validated the remaining value, so "@" alone was accepted as a valid identifier. Add an empty check after stripping and add tests.

The else branch stripped the '@' prefix via Substring(1) but never validated the remaining value, so "@" alone was accepted as a valid identifier. Add an empty check after stripping and add tests.
@mikeebowen mikeebowen requested a review from twsouthwick March 24, 2026 16:27
@github-actions
Copy link
Copy Markdown

Test Results

    79 files  + 12      79 suites  +12   1h 38m 14s ⏱️ + 3m 35s
 2 077 tests +  9   2 074 ✅ +  9   3 💤 ±0  0 ❌ ±0 
38 165 runs  +300  38 123 ✅ +300  42 💤 ±0  0 ❌ ±0 

Results for commit 2de87e3. ± Comparison against base commit 40ad85b.

@twsouthwick twsouthwick merged commit 0a24547 into dotnet:main Apr 28, 2026
20 checks passed
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.

4 participants