-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add analyzer for Environment.ProcessPath #42948
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I'll do it, guess it should be there https://github.com/dotnet/roslyn-analyzers/tree/master/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime. |
Thank you @Serg046 ! The naming and structure of this analyzer should mirror the naming and structure of the existing UseEnvironmentProcessId analyzer. It may be idea a good idea to just add handling of this pattern to the existing analyzer - see #42768 (comment) and #42768 (comment) for more context. |
Makes sense as proposed |
Environment.ProcessPath
API introduced by #40862 is a significantly more efficient replacement ofProcess.GetCurrentProcess().MainModule.FileName
. This pattern is quite common. We should add analyzer and fixer for this.More context: #42768 (comment)
The text was updated successfully, but these errors were encountered: