Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner June 17, 2025 17:35
@dotnet-policy-service dotnet-policy-service bot added VSCode Needs API Review Needs to be reviewed by the API review council labels Jun 17, 2025
case SyntaxKind.VariableDeclarator:
var declarationKind = GetDeclarationKind(declaration);
return declarationKind is DeclarationKind.Field or DeclarationKind.Event;
return declaration.Parent is VariableDeclarationSyntax { Parent: BaseFieldDeclarationSyntax };
Copy link
Member Author

Choose a reason for hiding this comment

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

we were pulling in an entire helper method, which had dependencies on a workspace enum, into this non-workspace-layer helper.

Untangled that, so that we don't need to try to make this enum available in two layers (esp. as it is already public)..

public override DeclarationKind GetDeclarationKind(SyntaxNode declaration)
=> CSharpAccessibilityFacts.GetDeclarationKind(declaration);
{
switch (declaration.Kind())
Copy link
Member Author

Choose a reason for hiding this comment

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

move. no logic touched at all.

<InternalsVisibleTo Include="Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\Workspaces\Core\Portable\Editing\DeclarationKind.cs" Link="Editing\DeclarationKind.cs" />
Copy link
Member Author

Choose a reason for hiding this comment

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

and there was much rejoicing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE Needs API Review Needs to be reviewed by the API review council VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants