Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose '$Main' via WellKnownMemberNames #45110

Closed
sharwell opened this issue Jun 12, 2020 · 1 comment · Fixed by #49650
Closed

Expose '$Main' via WellKnownMemberNames #45110

sharwell opened this issue Jun 12, 2020 · 1 comment · Fixed by #49650
Assignees
Labels
Area-IDE Bug Concept-API This issue involves adding, removing, clarification, or modification of an API.
Milestone

Comments

@sharwell
Copy link
Member

sharwell commented Jun 12, 2020

Currently we hard-coded $Main as a symbol name:

=> (methodSymbol.Name == WellKnownMemberNames.EntryPointMethodName || methodSymbol.Name == "$Main") &&

We should define a constant in WellKnownMemberNames for this and reference it from the analyzer.

🔗 Originally requested in #45090 (comment)

@sharwell sharwell added Area-Compilers Concept-API This issue involves adding, removing, clarification, or modification of an API. labels Jun 12, 2020
@jaredpar jaredpar added the Bug label Jun 22, 2020
@jaredpar jaredpar added this to the 16.8 milestone Jun 22, 2020
AlekseyTs added a commit to AlekseyTs/roslyn that referenced this issue Jul 14, 2020
AlekseyTs added a commit that referenced this issue Jul 14, 2020
@AlekseyTs
Copy link
Contributor

The constant is added, but I wasn't able to change AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs to use it because it looks like src\CodeStyle\Core\Analyzers\Microsoft.CodeAnalysis.CodeStyle.csproj is not building against the latest version of the WellKnownMemberNames type.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug Concept-API This issue involves adding, removing, clarification, or modification of an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants