-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
UseShellExecute analyzer #707
UseShellExecute analyzer #707
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before completing the PR, you'll need to run the DocumentationGenerator project to generate the md files.
tests/Meziantou.Analyzer.Test/Rules/UseShellExecuteAnalyzerTests.cs
Outdated
Show resolved
Hide resolved
bf255a2
to
6d3a1a9
Compare
This pull request is stale because it has been open for 60 days with no activity. |
This pull request is stale because it has been open for 60 days with no activity. |
6d3a1a9
to
40008ca
Compare
(false manipulation) |
I revived the PR @meziantou, let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few changes, then I'll merge it
description: "", | ||
helpLinkUri: RuleIdentifiers.GetHelpUri(RuleIdentifiers.UseShellExecuteMustBeSet)); | ||
|
||
private static readonly DiagnosticDescriptor UseProcessStartOverload = new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should have a different id per DiagnosticDescriptor. It gives more flexibility for the consumer of the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean add another rule "MA0162"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, in fact you should have 3 rule ids.
1bfb880
to
6c4e863
Compare
@meziantou I renamed the analyzer and created 3 different IDs and disabled 2 out of the 3. NB: The .cmd is failing on my computer (double
|
I still think we should enforce users to explicitly set |
It's probably the number 1 issue I've seen between .NET Framework and .NET Core so I thought that an analyzer might be helpful. Let me know what you think and I'll dig more.