Skip to content

fix: resolve CC012 None by symbol identity#31

Merged
georgepwall1991 merged 1 commit into
masterfrom
fix/cc012-none-symbol-identity
Jul 21, 2026
Merged

fix: resolve CC012 None by symbol identity#31
georgepwall1991 merged 1 commit into
masterfrom
fix/cc012-none-symbol-identity

Conversation

@georgepwall1991

Copy link
Copy Markdown
Owner

Summary

  • require .None to resolve to the actual static System.Threading.CancellationToken.None property
  • keep default and default(CancellationToken) behavior unchanged
  • add a regression guard for a custom token-valued property named None
  • prepare release metadata for v1.27.176

Why

CC012 previously matched member syntax by its final identifier only. A custom property named None could carry a canceled or otherwise meaningful token, yet the analyzer and fixer would suggest replacing it with an unrelated in-scope parameter.

Validation

  • red-first regression reproduced one unexpected CC012 diagnostic
  • focused CC012 tests: 11 passed
  • full suite: 630 passed, 0 failed
  • Release build: 0 errors (62 intentional sample analyzer warnings)
  • touched-file whitespace verification: clean
  • package inspection: both analyzer assemblies present; no NuGet dependencies
  • self-review completed as requested; no Claude review used

Known repository baseline

The repo-wide style verifier continues to report the existing IDE0011 brace backlog. No new whitespace issue exists in the touched C# files.

A custom CancellationToken-valued property named None can carry meaningful cancellation state. Requiring the framework property symbol prevents the analyzer and fixer from replacing that behavior.
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.

1 participant