Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

// Note: We avoid fixing diagnostics in generated code.
if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
{
#if WORKSPACE
Copy link
Member

@JoeRobich JoeRobich Aug 1, 2025

Choose a reason for hiding this comment

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

Should we advertise in some way that this helper will not work for these scopes from the code style layer? DocComment and Debug.Assert perhaps?

Copy link
Member Author

Choose a reason for hiding this comment

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

so, practically, it's a non issue. Here's why:

  1. we changed it so that we do NOT use the code-style analyzers/fixers ourselves within VS. Jared updated things so we always use what we shipped in box.
  2. So this only affects code style analyzers/fixers run by other tools that are pulling that in (like dotnet format). Those tools are not doing fix-all in that scoped fashion ('in correct type', etc).

I'm happy to comment and add asserts. I have a followup pr i can put that in if that works for you.

Copy link
Member Author

@CyrusNajmabadi CyrusNajmabadi Aug 1, 2025

Choose a reason for hiding this comment

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

@CyrusNajmabadi CyrusNajmabadi merged commit f9715b2 into dotnet:main Aug 1, 2025
25 of 26 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the sharedFixAllCode branch August 1, 2025 15:58
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 1, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants