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

UseShellExecute analyzer #707

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jairbubbles
Copy link

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.

src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
{
public void Test()
{
[||]Process.Start("notepad");
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure to understand why it should be reported. UseShellExecute is only useful when you want to redirect input/output. This method doesn't redirect output, so why do you need to report it?

Copy link
Author

Choose a reason for hiding this comment

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

Because it has a different default value between .NET Framework an .NET core.

src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
src/Meziantou.Analyzer/Rules/UseShellExecuteAnalyzer.cs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants