Skip to content

Conversation

@jairbubbles
Copy link
Contributor

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.

Copy link
Owner

@meziantou meziantou left a 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.

@jairbubbles jairbubbles force-pushed the useshellexecute-analyzer branch 2 times, most recently from bf255a2 to 6d3a1a9 Compare March 30, 2024 16:59
@github-actions
Copy link

This pull request is stale because it has been open for 60 days with no activity.

@github-actions
Copy link

This pull request is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Sep 29, 2024
@jairbubbles jairbubbles force-pushed the useshellexecute-analyzer branch from 6d3a1a9 to 40008ca Compare September 29, 2024 09:38
@jairbubbles
Copy link
Contributor Author

(false manipulation)

@jairbubbles jairbubbles reopened this Sep 29, 2024
@jairbubbles jairbubbles marked this pull request as ready for review September 29, 2024 11:33
@jairbubbles
Copy link
Contributor Author

I revived the PR @meziantou, let me know what you think.

Copy link
Owner

@meziantou meziantou left a 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(
Copy link
Owner

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.

Copy link
Contributor Author

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"?

Copy link
Owner

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.

@jairbubbles jairbubbles force-pushed the useshellexecute-analyzer branch from 1bfb880 to 6c4e863 Compare September 29, 2024 14:44
@jairbubbles
Copy link
Contributor Author

@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 docs folder):

Could not find a part of the path 'D:\Git\meziantou\Meziantou.Analyzer\docs\docs\README.md'

@jairbubbles
Copy link
Contributor Author

I still think we should enforce users to explicitly set UseShellExecute but as there's no 100% accurate way of detecting it, I guess we can't enable the rule by default.

@meziantou meziantou enabled auto-merge (squash) September 30, 2024 00:32
@meziantou meziantou disabled auto-merge September 30, 2024 00:39
@meziantou meziantou merged commit 9c95e25 into meziantou:main Sep 30, 2024
16 of 17 checks passed
xtqqczze pushed a commit to xtqqczze/meziantou-Meziantou.Analyzer that referenced this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants