Skip to content

Commit

Permalink
Merge pull request #1020 from bergmeister/OutputType
Browse files Browse the repository at this point in the history
Add OutputType attributes to cmdlets to enhance tab completion
  • Loading branch information
JamesWTruher authored Jul 19, 2018
2 parents dc0b4a3 + 0f7da0e commit a54a99c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions Engine/Commands/GetScriptAnalyzerRuleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
/// GetScriptAnalyzerRuleCommand: Cmdlet to list all the analyzer rule names and descriptions.
/// </summary>
[Cmdlet(VerbsCommon.Get, "ScriptAnalyzerRule", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=525913")]
[OutputType(typeof(RuleInfo))]
public class GetScriptAnalyzerRuleCommand : PSCmdlet, IOutputWriter
{
#region Parameters
Expand Down
1 change: 1 addition & 0 deletions Engine/Commands/InvokeFormatterCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
/// A cmdlet to format a PowerShell script text.
/// </summary>
[Cmdlet(VerbsLifecycle.Invoke, "Formatter")]
[OutputType(typeof(string))]
public class InvokeFormatterCommand : PSCmdlet, IOutputWriter
{
private const string defaultSettingsPreset = "CodeFormatting";
Expand Down
2 changes: 2 additions & 0 deletions Engine/Commands/InvokeScriptAnalyzerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
DefaultParameterSetName = "File",
SupportsShouldProcess = true,
HelpUri = "https://go.microsoft.com/fwlink/?LinkId=525914")]
[OutputType(typeof(DiagnosticRecord))]
[OutputType(typeof(SuppressedRecord))]
public class InvokeScriptAnalyzerCommand : PSCmdlet, IOutputWriter
{
#region Private variables
Expand Down
5 changes: 5 additions & 0 deletions docs/markdown/Invoke-Formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ Default value:
Accept pipeline input: False
Accept wildcard characters: False
```
## OUTPUTS
### System.String
The formatted string result.

0 comments on commit a54a99c

Please sign in to comment.