Skip to content

Commit 78ece95

Browse files
authored
Updated comment-based help .INPUTS and .OUTPUTS sections (#2358)
1 parent 79c0cc0 commit 78ece95

File tree

121 files changed

+729
-205
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+729
-205
lines changed

.github/instructions/dsc-community-style-guidelines-powershell.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ applyTo: "{**/*.ps1,**/*.psm1,**/*.psd1}"
6464
- Comment-based help: SYNOPSIS, DESCRIPTION (40+ chars), PARAMETER, EXAMPLE sections before function/class
6565
- Comment-based help indentation: keywords 4 spaces, text 8 spaces
6666
- Include examples for all parameter sets and combinations
67-
- INPUTS: List each pipeline‑accepted type (one per line) with a 1‑line description. Repeat keyword for each input type.
68-
- OUTPUTS: List each return type (one per line) with a 1‑line description. Repeat keyword for each output type. Must match both `[OutputType()]` and actual returns.
67+
- INPUTS: List each pipeline‑accepted type as inline code with a 1‑line description. Repeat keyword for each input type. If there are no inputs, specify `None.`.
68+
- OUTPUTS: List each return type as inline code with a 1‑line description. Repeat keyword for each output type. Must match both `[OutputType()]` and actual returns. If there are no outputs, specify `None.`.
6969
- .NOTES: Include only if it conveys critical info (constraints, side effects, security, version compatibility, breaking behavior). Keep to ≤2 short sentences.
7070

7171
## Functions

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121

2222
### Changed
2323

24+
- Updated comment-based help `.INPUTS` and `.OUTPUTS` sections across all public
25+
commands and private functions to comply with DSC community style guidelines
26+
([issue #2103](https://github.com/dsccommunity/SqlServerDsc/issues/2103)).
2427
- `Set-SqlDscDatabaseProperty`
2528
- Updated comment-based help to reference correct enum values.
2629
- Added SQL Server version requirements to version-specific parameter help.

source/Private/Assert-Feature.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
1818
Throws an exception if the feature is not supported.
1919
20+
.INPUTS
21+
`System.String[]`
22+
23+
Accepts an array of feature names via the pipeline.
24+
2025
.OUTPUTS
2126
None.
2227
#>

source/Private/Assert-ManagedServiceType.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
2525
Asserts that the computer managed service object is of the type Database Engine.
2626
27+
.INPUTS
28+
`Microsoft.SqlServer.Management.Smo.Wmi.Service`
29+
30+
Accepts a SQL Server managed service object via the pipeline.
31+
2732
.OUTPUTS
2833
None.
2934
#>

source/Private/Assert-SetupActionProperties.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
1818
Throws an exception if the bound parameters are not in the correct state.
1919
20+
.INPUTS
21+
None.
22+
2023
.OUTPUTS
2124
None.
2225

source/Private/ConvertFrom-ManagedServiceType.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
ConvertFrom-ManagedServiceType -ServiceType 'SqlServer'
1515
1616
Returns the normalized service type name 'DatabaseEngine' .
17+
18+
.INPUTS
19+
`Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType`
20+
21+
Accepts a managed service type via the pipeline.
22+
23+
.OUTPUTS
24+
`System.String`
25+
26+
Returns the normalized service type name.
1727
#>
1828
function ConvertFrom-ManagedServiceType
1929
{

source/Private/ConvertTo-AuditNewParameterSet.ps1

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
Converts an existing audit object to a parameter set with a custom GUID.
2929
3030
.INPUTS
31-
None
32-
33-
This function does not accept pipeline input.
31+
None.
3432
3533
.OUTPUTS
36-
System.Collections.Hashtable
34+
`System.Collections.Hashtable`
3735
3836
Returns a hashtable of parameters for New-SqlDscAudit.
3937
#>

source/Private/ConvertTo-FormattedParameterDescription.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
.PARAMETER Exclude
1414
Array of parameter names to exclude from the formatted output.
1515
16+
.INPUTS
17+
None.
18+
1619
.OUTPUTS
17-
System.String
20+
`System.String`
1821
1922
Returns a formatted string with parameters and their values.
2023

source/Private/ConvertTo-ManagedServiceType.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,21 @@
1414
ConvertTo-ManagedServiceType -ServiceType 'DatabaseEngine'
1515
1616
Returns the manged service type name for the normalized service type 'DatabaseEngine'.
17+
18+
.INPUTS
19+
`System.String`
20+
21+
Accepts a normalized service type name via the pipeline.
22+
23+
.OUTPUTS
24+
`Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType`
25+
26+
Returns the managed service type.
1727
#>
1828
function ConvertTo-ManagedServiceType
1929
{
2030
[CmdletBinding()]
31+
[OutputType([Microsoft.SqlServer.Management.Smo.Wmi.ManagedServiceType])]
2132
param
2233
(
2334
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]

source/Private/ConvertTo-RedactedText.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,21 @@
2727
ConvertTo-RedactedText -Text 'My secret phrase: secret123' -RedactPhrase 'secret123' -RedactWith '----'
2828
2929
Returns the text with the phrases redacted to '----'.
30+
31+
.INPUTS
32+
`System.String`
33+
34+
Accepts text to be redacted via the pipeline.
35+
36+
.OUTPUTS
37+
`System.String`
38+
39+
Returns the redacted text.
3040
#>
3141
function ConvertTo-RedactedText
3242
{
3343
[CmdletBinding()]
44+
[OutputType([System.String])]
3445
param
3546
(
3647
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]

0 commit comments

Comments
 (0)