Skip to content

Implement UseOutputTypeCorrectly #69

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

Merged
merged 5 commits into from
Apr 27, 2015
Merged

Implement UseOutputTypeCorrectly #69

merged 5 commits into from
Apr 27, 2015

Conversation

quoctruong
Copy link

If we can identify the type of an object that is outputted to the pipeline by a cmdlet, then that type must be listed in the OutputType attribute.

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// ProvideCommentHelp: Analyzes ast to check that cmdlets have help.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong comment?

@quoctruong
Copy link
Author

Fixed. I will update the rule documentation after too.

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.BuiltinRules
{
/// <summary>
/// ProvideCommentHelp: Checks that objects return in a cmdlet have their types declared in OutputType Attribute
Copy link
Contributor

Choose a reason for hiding this comment

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

"ProvideCommentHelp: " Should be UseOutputTypeCorrectly?

@quoctruong
Copy link
Author

Updated with documentation

@quoctruong
Copy link
Author

Change severity to information

@yutingc
Copy link
Contributor

yutingc commented Apr 27, 2015

Looks good to me.

@raghushantha
Copy link
Member

sign-off. thanks.

quoctruong pushed a commit that referenced this pull request Apr 27, 2015
Implement UseOutputTypeCorrectly
@quoctruong quoctruong merged commit 2af9cb8 into development Apr 27, 2015
@quoctruong
Copy link
Author

Thanks!

@quoctruong quoctruong deleted the returntyperule branch April 27, 2015 20:27
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.

4 participants