You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments","ModuleBuildLoggingEnabled",Justification="ModuleBuildLoggingEnabled is optional. It's used to enable Nlog-based logging.")]
6
2
param()
7
3
8
-
$ModuleBuildLoggingEnabled=$false# Set to true to enable nlog-based logging
4
+
$ModuleBuildLoggingEnabled=$false# Set to true to enable nlog-based logging
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess","", Scope="Function", Target="somefunct",Justification="This is a dummy function in order to get all CommonParameters without hardcoding them. There is no reason for it to actually use SupportsShouldProcess.")]
Copy file name to clipboardExpand all lines: src/private/New-CommentBasedHelp.ps1
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,10 @@
29
29
Version History
30
30
1.0.0 - Initial release
31
31
1.0.1 - Updated for ModuleBuild
32
+
1.0.2 - Added SuppressMessageAttribute
32
33
#>
34
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseDeclaredVarsMoreThanAssignments","ScriptText",Scope="Function",Target="New-CommentBasedHelp",Justification="Seems it's here since duo a copy paste from other functions (Add-MissingCBH,Get-Function,Get-FunctionParameter). Leaving it here since it doesn't do any harm.")]
35
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions","",Scope="Function",Target="New-CommentBasedHelp",Justification="Function does not change system state. Simply outputs a obj with CommentBasedHelp.")]
33
36
[CmdletBinding()]
34
37
param(
35
38
[parameter(Position=0,ValueFromPipeline=$true,HelpMessage='Lines of code to process.')]
Copy file name to clipboardExpand all lines: src/private/New-DynamicParameter.ps1
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -415,6 +415,7 @@ function New-DynamicParameter {
415
415
}
416
416
}
417
417
#>
418
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions","",Scope="Function",Target="New-DynamicParameter",Justification="Function does not change system state.")]
Copy file name to clipboardExpand all lines: src/public/Import-ModulePrivateFunction.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ function Import-ModulePrivateFunction {
35
35
.NOTES
36
36
This only applies to modules of the type 'Script'. Be very careful before importing everything as any wayward functions might get imported and bloat your resulting module needlessly.
37
37
#>
38
-
38
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidDefaultValueSwitchParameter","",Scope="function",Target="Import-ModulePrivateFunction",Justification="Not adding CBH by default is actually useful.")]
0 commit comments