From 1ef888dbb1720016e9be38f7de94c7995a6e60cc Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sat, 16 Nov 2019 01:29:00 -0500 Subject: [PATCH 01/23] Add rule for missing process block #1368 --- Rules/Strings.resx | 2178 ++++++++++--------- Rules/UseProcessBlockForPipelineCommands.cs | 99 + 2 files changed, 1194 insertions(+), 1083 deletions(-) create mode 100644 Rules/UseProcessBlockForPipelineCommands.cs diff --git a/Rules/Strings.resx b/Rules/Strings.resx index dd5825e53..964b6bf64 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1,1083 +1,1095 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. - - - Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. - - - Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. - - - Avoid Using Empty Catch Block - - - The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. - - - Avoid Using Invoke-Expression - - - Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. - - - Avoid Using Positional Parameters - - - Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. - - - The cmdlet '{0}' does not have a help comment. - - - Basic Comment Help - - - Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. - - - The cmdlet '{0}' uses an unapproved verb. - - - Cmdlet Verbs - - - Ensure declared variables are used elsewhere in the script and not just during assignment. - - - The variable '{0}' is assigned but never used. - - - Extra Variables - - - Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. - - - Found global variable '{0}'. - - - No Global Variables - - - Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. - - - $null should be on the left side of equality comparisons. - - - Null Comparison - - - Checks that cmdlets and parameters have more than one character. - - - The cmdlet name '{0}' only has one character. - - - The cmdlet '{0}' has a parameter '{1}' that only has one character. - - - A script block has a parameter '{0}' that only has one character. - - - One Char - - - For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. - - - The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - Use PSCredential type. - - - Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. - - - The cmdlet '{0}' uses a reserved char in its name. - - - Reserved Cmdlet Chars - - - The cmdlet '{0}' - - - Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. - - - '{0}' defines the reserved common parameter '{1}'. - - - Reserved Parameters - - - The script - - - #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ - - - Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. - - - '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - Should Process - - - PS - - - It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. - - - There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. - - - Use verbose message in DSC resource - - - Some fields of the module manifest (such as ModuleVersion) are required. - - - Module Manifest Fields - - - If a script file is in a PowerShell module folder, then that folder must be loadable. - - - Cannot load the module '{0}' that file '{1}' is in. - - - Module Must Be Loadable - - - Error Message is Null. - - - Password parameters that take in plaintext will expose passwords and compromise the security of your system. - - - Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. - - - Avoid Using Plain Text For Password Parameter - - - Using ConvertTo-SecureString with plain text will expose secure information. - - - File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Avoid Using SecureString With Plain Text - - - Switch parameter should not default to true. - - - File '{0}' has a switch parameter default to true. - - - Switch Parameters Should Not Default To True - - - Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. - - - Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Avoid Using ShouldContinue Without Boolean Force Parameter - - - Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. - - - File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. - - - Avoid Using Clear-Host - - - File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - - - Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - - - File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - Avoid Using Write-Host - - - Cmdlet should use singular instead of plural nouns. - - - The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. - - - Cmdlet Singular Noun - - - AvoidUsingCmdletAliases - - - AvoidDefaultValueSwitchParameter - - - AvoidGlobalVars - - - AvoidShouldContinueWithoutForce - - - AvoidUnloadableModule - - - AvoidUsingClearHost - - - AvoidUsingConvertToSecureStringWithPlainText - - - AvoidUsingEmptyCatchBlock - - - AvoidUsingInvokeExpression - - - AvoidUsingPlainTextForPassword - - - AvoidUsingPositionalParameters - - - AvoidUsingWriteHost - - - OneChar - - - PossibleIncorrectComparisonWithNull - - - ProvideCommentHelp - - - ReservedCmdletChar - - - ReservedParams - - - ShouldProcess - - - UseApprovedVerbs - - - UseDeclaredVarsMoreThanAssignments - - - UsePSCredentialType - - - UseSingularNouns - - - MissingModuleManifestField - - - UseVerboseMessageInDSCResource - - - Command Not Found - - - Commands that are undefined or do not exist should not be used. - - - Command '{0}' Is Not Found - - - CommandNotFound - - - Type Not Found - - - Undefined type should not be used - - - Type '{0}' is not found. Please check that it is defined. - - - TypeNotFound - - - Use Cmdlet Correctly - - - Cmdlet should be called with the mandatory parameters. - - - Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. - - - UseCmdletCorrectly - - - Use Type At Variable Assignment - - - Types should be specified at variable assignments to maintain readability and maintainability of script. - - - Specify type at the assignment of variable '{0}' - - - UseTypeAtVariableAssignment - - - Avoid Using Username and Password Parameters - - - Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. - - - Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. - - - AvoidUsingUsernameAndPasswordParams - - - Avoid Invoking Empty Members - - - Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. - - - '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. - - - AvoidInvokingEmptyMembers - - - Avoid Using ComputerName Hardcoded - - - The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. - - - The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. - - - AvoidUsingComputerNameHardcoded - - - Empty catch block is used. Please use Write-Error or throw statements in catch blocks. - - - '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. - - - Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. - - - Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. - - - {0}{1} - - - Cannot process null Ast - - - Cannot process null CommandInfo - - - PSDSC - - - Use Standard Get/Set/Test TargetResource functions in DSC Resource - - - DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. - - - Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. - - - StandardDSCFunctionsInResource - - - Avoid Using Internal URLs - - - Using Internal URLs in the scripts may cause security problems. - - - '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. - - - AvoidUsingInternalURLs - - - www.sharepoint.com - - - Use Identical Parameters For DSC Test and Set Functions - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - UseIdenticalParametersForDSC - - - Missing '{0}' function. DSC Class must implement Get, Set and Test functions. - - - Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions - - - The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. - - - The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). - - - UseIdenticalMandatoryParametersForDSC - - - Not all code path in {0} function in DSC Class {1} returns a value - - - ReturnCorrectTypesForDSCFunctions - - - Return Correct Types For DSC Functions - - - Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. - - - {0} function in DSC Class {1} should return object of type {2} - - - {0} function in DSC Class {1} should return object of type {2} instead of type {3} - - - Set function in DSC Class {0} should not return anything - - - {0} function in DSC Resource should return object of type {1} instead of {2} - - - Set-TargetResource function in DSC Resource should not output anything to the pipeline. - - - Use ShouldProcess For State Changing Functions - - - Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. - - - Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. - - - UseShouldProcessForStateChangingFunctions - - - Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance - - - Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. - - - File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - AvoidUsingWMICmdlet - - - Use OutputType Correctly - - - The return types of a cmdlet should be declared using the OutputType attribute. - - - The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. - - - UseOutputTypeCorrectly - - - DscTestsPresent - - - Dsc tests are present - - - Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. - - - No tests found for resource '{0}' - - - DscExamplesPresent - - - DSC examples are present - - - Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. - - - No examples found for resource '{0}' - - - Avoid Default Value For Mandatory Parameter - - - Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. - - - Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. - - - AvoidDefaultValueForMandatoryParameter - - - Avoid Using Deprecated Manifest Fields - - - "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. - - - AvoidUsingDeprecatedManifestFields - - - Use UTF8 Encoding For Help File - - - PowerShell help file needs to use UTF8 Encoding. - - - File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. - - - UseUTF8EncodingForHelpFile - - - Use BOM encoding for non-ASCII files - - - For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. - - - Missing BOM encoding for non-ASCII encoded file '{0}' - - - UseBOMForUnicodeEncodedFile - - - Script definition has a switch parameter default to true. - - - Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - ScriptDefinition - - - Misleading Backtick - - - Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. - - - MisleadingBacktick - - - This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? - - - Avoid using null or empty HelpMessage parameter attribute. - - - Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. - - - HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. - - - AvoidNullOrEmptyHelpMessageAttribute - - - Use the *ToExport module manifest fields. - - - In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. - - - Do not use wildcard or $null in this field. Explicitly specify a list for {0}. - - - UseToExportFieldsInManifest - - - Replace {0} with {1} - - - Set {0} type to SecureString - - - Add {0} = {1} to the module manifest - - - Replace {0} with {1} - - - Create hashtables with literal initializers - - - Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default - - - Create hashtables with literal initliazers - - - UseLiteralInitializerForHashtable - - - UseCompatibleCmdlets - - - Use compatible cmdlets - - - Use cmdlets compatible with the given PowerShell version and edition and operating system - - - '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' - - - UseCompatibleCommands - - - Use compatible commands - - - Use commands compatible with the given PowerShell version and operating system - - - The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleTypes - - - Use compatible types - - - Use types compatible with the given PowerShell version and operating system - - - The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleSyntax - - - Use compatible syntax - - - Use script syntax compatible with the given PowerShell versions - - - The {0} syntax '{1}' is not available by default in PowerShell versions {2} - - - Use the '{0}' syntax instead for compatibility with PowerShell versions {1} - - - The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - Avoid global functiosn and aliases - - - Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. - - - Avoid creating functions with a Global scope. - - - AvoidGlobalFunctions - - - Avoid global aliases. - - - Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. - - - Avoid creating aliases with a Global scope. - - - AvoidGlobalAliases - - - AvoidTrailingWhitespace - - - Avoid trailing whitespace - - - Each line should have no trailing whitespace. - - - Line has trailing whitespace - - - AvoidLongLines - - - Avoid long lines - - - Line lengths should be less than the configured maximum - - - Line exceeds the configured maximum length of {0} characters - - - PlaceOpenBrace - - - Place open braces consistently - - - Place open braces either on the same line as the preceding expression or on a new line. - - - Open brace not on same line as preceding keyword. It should be on the same line. - - - Open brace is not on a new line. - - - There is no new line after open brace. - - - PlaceCloseBrace - - - Place close braces - - - Close brace should be on a new line by itself. - - - Close brace is not on a new line. - - - Close brace does not follow a non-empty line. - - - Close brace does not follow a new line. - - - Close brace before a branch statement is followed by a new line. - - - UseConsistentIndentation - - - Use consistent indentation - - - Each statement block should have a consistent indenation. - - - Indentation not consistent - - - UseConsistentWhitespace - - - Use whitespaces - - - Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') - - - Use space before open brace. - - - Use space before open parenthesis. - - - Use space before and after binary and assignment operators. - - - Use space after a comma. - - - Use space after a semicolon. - - - UseSupportsShouldProcess - - - Use SupportsShouldProcess - - - Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. - - - Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. - - - AlignAssignmentStatement - - - Align assignment statement - - - Line up assignment statements such that the assignment operator are aligned. - - - Assignment statements are not aligned - - - '=' is not an assignment operator. Did you mean the equality operator '-eq'? - - - PossibleIncorrectUsageOfAssignmentOperator - - - Use a different variable name - - - Changing automtic variables might have undesired side effects - - - This automatic variables is built into PowerShell and readonly. - - - The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - AvoidAssignmentToAutomaticVariable - - - Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. - - - '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. - - - Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. - - - '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). - - - When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. - - - Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). - - - PossibleIncorrectUsageOfRedirectionOperator - - - Use $null on the left hand side for safe comparison with $null. - - - Use space after open brace. - - - Use space before closing brace. - - - Use space after pipe. - - - Use space before pipe. - - - Use exact casing of cmdlet/function name. - - - For better readability and consistency, use the exact casing of the cmdlet/function. - - - Cmdlet/Function does not match its exact casing '{0}'. - - - UseCorrectCasing - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. + + + Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. + + + Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. + + + Avoid Using Empty Catch Block + + + The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. + + + Avoid Using Invoke-Expression + + + Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. + + + Avoid Using Positional Parameters + + + Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. + + + The cmdlet '{0}' does not have a help comment. + + + Basic Comment Help + + + Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. + + + The cmdlet '{0}' uses an unapproved verb. + + + Cmdlet Verbs + + + Ensure declared variables are used elsewhere in the script and not just during assignment. + + + The variable '{0}' is assigned but never used. + + + Extra Variables + + + Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. + + + Found global variable '{0}'. + + + No Global Variables + + + Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. + + + $null should be on the left side of equality comparisons. + + + Null Comparison + + + Checks that cmdlets and parameters have more than one character. + + + The cmdlet name '{0}' only has one character. + + + The cmdlet '{0}' has a parameter '{1}' that only has one character. + + + A script block has a parameter '{0}' that only has one character. + + + One Char + + + For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. + + + The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + Use PSCredential type. + + + Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. + + + The cmdlet '{0}' uses a reserved char in its name. + + + Reserved Cmdlet Chars + + + The cmdlet '{0}' + + + Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. + + + '{0}' defines the reserved common parameter '{1}'. + + + Reserved Parameters + + + The script + + + #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ + + + Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. + + + '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + Should Process + + + PS + + + It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. + + + There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. + + + Use verbose message in DSC resource + + + Some fields of the module manifest (such as ModuleVersion) are required. + + + Module Manifest Fields + + + If a script file is in a PowerShell module folder, then that folder must be loadable. + + + Cannot load the module '{0}' that file '{1}' is in. + + + Module Must Be Loadable + + + Error Message is Null. + + + Password parameters that take in plaintext will expose passwords and compromise the security of your system. + + + Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. + + + Avoid Using Plain Text For Password Parameter + + + Using ConvertTo-SecureString with plain text will expose secure information. + + + File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Avoid Using SecureString With Plain Text + + + Switch parameter should not default to true. + + + File '{0}' has a switch parameter default to true. + + + Switch Parameters Should Not Default To True + + + Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. + + + Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Avoid Using ShouldContinue Without Boolean Force Parameter + + + Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. + + + File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. + + + Avoid Using Clear-Host + + + File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. + + + Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. + + + File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + Avoid Using Write-Host + + + Cmdlet should use singular instead of plural nouns. + + + The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. + + + Cmdlet Singular Noun + + + AvoidUsingCmdletAliases + + + AvoidDefaultValueSwitchParameter + + + AvoidGlobalVars + + + AvoidShouldContinueWithoutForce + + + AvoidUnloadableModule + + + AvoidUsingClearHost + + + AvoidUsingConvertToSecureStringWithPlainText + + + AvoidUsingEmptyCatchBlock + + + AvoidUsingInvokeExpression + + + AvoidUsingPlainTextForPassword + + + AvoidUsingPositionalParameters + + + AvoidUsingWriteHost + + + OneChar + + + PossibleIncorrectComparisonWithNull + + + ProvideCommentHelp + + + ReservedCmdletChar + + + ReservedParams + + + ShouldProcess + + + UseApprovedVerbs + + + UseDeclaredVarsMoreThanAssignments + + + UsePSCredentialType + + + UseSingularNouns + + + MissingModuleManifestField + + + UseVerboseMessageInDSCResource + + + Command Not Found + + + Commands that are undefined or do not exist should not be used. + + + Command '{0}' Is Not Found + + + CommandNotFound + + + Type Not Found + + + Undefined type should not be used + + + Type '{0}' is not found. Please check that it is defined. + + + TypeNotFound + + + Use Cmdlet Correctly + + + Cmdlet should be called with the mandatory parameters. + + + Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. + + + UseCmdletCorrectly + + + Use Type At Variable Assignment + + + Types should be specified at variable assignments to maintain readability and maintainability of script. + + + Specify type at the assignment of variable '{0}' + + + UseTypeAtVariableAssignment + + + Avoid Using Username and Password Parameters + + + Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. + + + Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. + + + AvoidUsingUsernameAndPasswordParams + + + Avoid Invoking Empty Members + + + Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. + + + '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. + + + AvoidInvokingEmptyMembers + + + Avoid Using ComputerName Hardcoded + + + The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. + + + The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. + + + AvoidUsingComputerNameHardcoded + + + Empty catch block is used. Please use Write-Error or throw statements in catch blocks. + + + '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. + + + Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. + + + Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. + + + {0}{1} + + + Cannot process null Ast + + + Cannot process null CommandInfo + + + PSDSC + + + Use Standard Get/Set/Test TargetResource functions in DSC Resource + + + DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. + + + Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. + + + StandardDSCFunctionsInResource + + + Avoid Using Internal URLs + + + Using Internal URLs in the scripts may cause security problems. + + + '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. + + + AvoidUsingInternalURLs + + + www.sharepoint.com + + + Use Identical Parameters For DSC Test and Set Functions + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + UseIdenticalParametersForDSC + + + Missing '{0}' function. DSC Class must implement Get, Set and Test functions. + + + Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions + + + The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. + + + The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). + + + UseIdenticalMandatoryParametersForDSC + + + Not all code path in {0} function in DSC Class {1} returns a value + + + ReturnCorrectTypesForDSCFunctions + + + Return Correct Types For DSC Functions + + + Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. + + + {0} function in DSC Class {1} should return object of type {2} + + + {0} function in DSC Class {1} should return object of type {2} instead of type {3} + + + Set function in DSC Class {0} should not return anything + + + {0} function in DSC Resource should return object of type {1} instead of {2} + + + Set-TargetResource function in DSC Resource should not output anything to the pipeline. + + + Use ShouldProcess For State Changing Functions + + + Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. + + + Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. + + + UseShouldProcessForStateChangingFunctions + + + Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance + + + Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. + + + File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + AvoidUsingWMICmdlet + + + Use OutputType Correctly + + + The return types of a cmdlet should be declared using the OutputType attribute. + + + The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. + + + UseOutputTypeCorrectly + + + DscTestsPresent + + + Dsc tests are present + + + Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. + + + No tests found for resource '{0}' + + + DscExamplesPresent + + + DSC examples are present + + + Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. + + + No examples found for resource '{0}' + + + Avoid Default Value For Mandatory Parameter + + + Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. + + + Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. + + + AvoidDefaultValueForMandatoryParameter + + + Avoid Using Deprecated Manifest Fields + + + "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. + + + AvoidUsingDeprecatedManifestFields + + + Use UTF8 Encoding For Help File + + + PowerShell help file needs to use UTF8 Encoding. + + + File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. + + + UseUTF8EncodingForHelpFile + + + Use BOM encoding for non-ASCII files + + + For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. + + + Missing BOM encoding for non-ASCII encoded file '{0}' + + + UseBOMForUnicodeEncodedFile + + + Script definition has a switch parameter default to true. + + + Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + ScriptDefinition + + + Misleading Backtick + + + Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. + + + MisleadingBacktick + + + This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? + + + Avoid using null or empty HelpMessage parameter attribute. + + + Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. + + + HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. + + + AvoidNullOrEmptyHelpMessageAttribute + + + Use the *ToExport module manifest fields. + + + In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. + + + Do not use wildcard or $null in this field. Explicitly specify a list for {0}. + + + UseToExportFieldsInManifest + + + Replace {0} with {1} + + + Set {0} type to SecureString + + + Add {0} = {1} to the module manifest + + + Replace {0} with {1} + + + Create hashtables with literal initializers + + + Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default + + + Create hashtables with literal initliazers + + + UseLiteralInitializerForHashtable + + + UseCompatibleCmdlets + + + Use compatible cmdlets + + + Use cmdlets compatible with the given PowerShell version and edition and operating system + + + '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' + + + UseCompatibleCommands + + + Use compatible commands + + + Use commands compatible with the given PowerShell version and operating system + + + The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleTypes + + + Use compatible types + + + Use types compatible with the given PowerShell version and operating system + + + The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleSyntax + + + Use compatible syntax + + + Use script syntax compatible with the given PowerShell versions + + + The {0} syntax '{1}' is not available by default in PowerShell versions {2} + + + Use the '{0}' syntax instead for compatibility with PowerShell versions {1} + + + The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + Avoid global functiosn and aliases + + + Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. + + + Avoid creating functions with a Global scope. + + + AvoidGlobalFunctions + + + Avoid global aliases. + + + Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. + + + Avoid creating aliases with a Global scope. + + + AvoidGlobalAliases + + + AvoidTrailingWhitespace + + + Avoid trailing whitespace + + + Each line should have no trailing whitespace. + + + Line has trailing whitespace + + + AvoidLongLines + + + Avoid long lines + + + Line lengths should be less than the configured maximum + + + Line exceeds the configured maximum length of {0} characters + + + PlaceOpenBrace + + + Place open braces consistently + + + Place open braces either on the same line as the preceding expression or on a new line. + + + Open brace not on same line as preceding keyword. It should be on the same line. + + + Open brace is not on a new line. + + + There is no new line after open brace. + + + PlaceCloseBrace + + + Place close braces + + + Close brace should be on a new line by itself. + + + Close brace is not on a new line. + + + Close brace does not follow a non-empty line. + + + Close brace does not follow a new line. + + + Close brace before a branch statement is followed by a new line. + + + UseConsistentIndentation + + + Use consistent indentation + + + Each statement block should have a consistent indenation. + + + Indentation not consistent + + + UseConsistentWhitespace + + + Use whitespaces + + + Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') + + + Use space before open brace. + + + Use space before open parenthesis. + + + Use space before and after binary and assignment operators. + + + Use space after a comma. + + + Use space after a semicolon. + + + UseSupportsShouldProcess + + + Use SupportsShouldProcess + + + Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. + + + Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. + + + AlignAssignmentStatement + + + Align assignment statement + + + Line up assignment statements such that the assignment operator are aligned. + + + Assignment statements are not aligned + + + '=' is not an assignment operator. Did you mean the equality operator '-eq'? + + + PossibleIncorrectUsageOfAssignmentOperator + + + Use a different variable name + + + Changing automtic variables might have undesired side effects + + + This automatic variables is built into PowerShell and readonly. + + + The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + AvoidAssignmentToAutomaticVariable + + + Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. + + + '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. + + + Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. + + + '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). + + + When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. + + + Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). + + + PossibleIncorrectUsageOfRedirectionOperator + + + Use $null on the left hand side for safe comparison with $null. + + + Use space after open brace. + + + Use space before closing brace. + + + Use space after pipe. + + + Use space before pipe. + + + Use exact casing of cmdlet/function name. + + + For better readability and consistency, use the exact casing of the cmdlet/function. + + + Cmdlet/Function does not match its exact casing '{0}'. + + + UseCorrectCasing + + + Use process block for pipeline commands + + + If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + + + Commands that support pipeline input should return output in a process block. + + + UseProcessBlockForPipelineCommands + + \ No newline at end of file diff --git a/Rules/UseProcessBlockForPipelineCommands.cs b/Rules/UseProcessBlockForPipelineCommands.cs new file mode 100644 index 000000000..e11499202 --- /dev/null +++ b/Rules/UseProcessBlockForPipelineCommands.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Management.Automation.Language; +using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic; +#if !CORECLR +using System.ComponentModel.Composition; +#endif +using System.Globalization; + +namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules +{ +#if !CORECLR + [Export(typeof(IScriptRule))] +#endif + public class UseProcessBlockForPipelineCommands : IScriptRule + { + public IEnumerable AnalyzeScript(Ast ast, string fileName) + { + if (ast == null) throw new ArgumentNullException(Strings.NullAstErrorMessage); + + IEnumerable functionAsts = ast.FindAll(testAst => testAst is FunctionDefinitionAst, true); + + foreach (FunctionDefinitionAst funcAst in functionAsts) + { + if + ( + funcAst.Body != null + && funcAst.Body.ParamBlock != null + && funcAst.Body.ParamBlock.Attributes != null + && funcAst.Body.ParamBlock.Parameters != null + && funcAst.Body.ProcessBlock == null + ) + { + foreach (var paramAst in funcAst.Body.ParamBlock.Parameters) + { + foreach (var paramAstAttribute in paramAst.Attributes) + { + if (paramAstAttribute is AttributeAst) + { + var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; + if (namedArguments != null) + { + foreach (NamedAttributeArgumentAst namedArgument in namedArguments) + { + if + ( + String.Equals(namedArgument.ArgumentName, "valuefrompipeline", StringComparison.OrdinalIgnoreCase) + || String.Equals(namedArgument.ArgumentName, "valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) + ) + { + yield return new DiagnosticRecord( + string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), + paramAst.Name.Extent, + GetName(), + DiagnosticSeverity.Warning, + fileName, + paramAst.Name.VariablePath.UserPath + ); + } + } + } + } + } + } + } + } + } + + public string GetName() + { + return string.Format(CultureInfo.CurrentCulture, Strings.NameSpaceFormat, GetSourceName(), Strings.UseProcessBlockForPipelineCommandsName); + } + + public string GetCommonName() + { + return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsCommonName); + } + + public string GetDescription() + { + return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsDescription); + } + + public SourceType GetSourceType() + { + return SourceType.Builtin; + } + + public RuleSeverity GetSeverity() + { + return RuleSeverity.Warning; + } + + public string GetSourceName() + { + return string.Format(CultureInfo.CurrentCulture, Strings.SourceName); + } + } +} From 1ad72e7878def75201f044146578af5433a7adf8 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 16 Nov 2019 16:11:46 +0000 Subject: [PATCH 02/23] Fix build by regenerating strongly typed files by running '.\New-StronglyTypedCsFileForResx.ps1 Rules' --- Rules/Strings.Designer.cs | 5305 +++++++++++++++++++------------------ 1 file changed, 2660 insertions(+), 2645 deletions(-) diff --git a/Rules/Strings.Designer.cs b/Rules/Strings.Designer.cs index 42d5a846e..f362e677b 100644 --- a/Rules/Strings.Designer.cs +++ b/Rules/Strings.Designer.cs @@ -1,2971 +1,2986 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// This code was generated by a New-StronglyTypedCsFileForResx function. +// To add or remove a member, edit your .ResX file then rerun Start-ResGen. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Microsoft.Windows.PowerShell.ScriptAnalyzer { - using System; - - +namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules { +using System; +using System.Reflection; + +/// +/// A strongly-typed resource class, for looking up localized strings, etc. +/// +[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] +[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] +[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + +internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Strings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Strings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.Strings", typeof(Strings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Align assignment statement. - /// - internal static string AlignAssignmentStatementCommonName { - get { - return ResourceManager.GetString("AlignAssignmentStatementCommonName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Line up assignment statements such that the assignment operator are aligned.. - /// - internal static string AlignAssignmentStatementDescription { - get { - return ResourceManager.GetString("AlignAssignmentStatementDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Assignment statements are not aligned. - /// - internal static string AlignAssignmentStatementError { - get { - return ResourceManager.GetString("AlignAssignmentStatementError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AlignAssignmentStatement. - /// - internal static string AlignAssignmentStatementName { - get { - return ResourceManager.GetString("AlignAssignmentStatementName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AvoidAssignmentToAutomaticVariable. - /// - internal static string AvoidAssignmentToAutomaticVariableName { - get { - return ResourceManager.GetString("AvoidAssignmentToAutomaticVariableName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use a different variable name. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariable { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Changing automtic variables might have undesired side effects. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableCommonName { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableCommonName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This automatic variables is built into PowerShell and readonly.. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableDescription { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name.. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableError { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name.. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Avoid Using ComputerName Hardcoded. - /// - internal static string AvoidComputerNameHardcodedCommonName { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedCommonName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.. - /// - internal static string AvoidComputerNameHardcodedDescription { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared.. - /// - internal static string AvoidComputerNameHardcodedError { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedError", resourceCulture); + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.Strings", typeof(Strings).GetTypeInfo().Assembly); + resourceMan = temp; } + return resourceMan; } - - /// - /// Looks up a localized string similar to AvoidUsingComputerNameHardcoded. - /// - internal static string AvoidComputerNameHardcodedName { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedName", resourceCulture); - } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; } - - /// - /// Looks up a localized string similar to Avoid Default Value For Mandatory Parameter. - /// - internal static string AvoidDefaultValueForMandatoryParameterCommonName { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterCommonName", resourceCulture); - } + set { + resourceCulture = value; } - - /// - /// Looks up a localized string similar to Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block.. - /// - internal static string AvoidDefaultValueForMandatoryParameterDescription { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. + /// + internal static string AvoidUsingCmdletAliasesDescription { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized.. - /// - internal static string AvoidDefaultValueForMandatoryParameterError { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. + /// + internal static string AvoidUsingCmdletAliasesCommonName { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidDefaultValueForMandatoryParameter. - /// - internal static string AvoidDefaultValueForMandatoryParameterName { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. + /// + internal static string AvoidUsingEmptyCatchBlockDescription { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Switch Parameters Should Not Default To True. - /// - internal static string AvoidDefaultValueSwitchParameterCommonName { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Empty Catch Block + /// + internal static string AvoidUsingEmptyCatchBlockCommonName { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Switch parameter should not default to true.. - /// - internal static string AvoidDefaultValueSwitchParameterDescription { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. + /// + internal static string AvoidUsingInvokeExpressionRuleDescription { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' has a switch parameter default to true.. - /// - internal static string AvoidDefaultValueSwitchParameterError { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Invoke-Expression + /// + internal static string AvoidUsingInvokeExpressionRuleCommonName { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Script definition has a switch parameter default to true.. - /// - internal static string AvoidDefaultValueSwitchParameterErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterErrorScriptDefinition", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. + /// + internal static string AvoidUsingPositionalParametersDescription { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidDefaultValueSwitchParameter. - /// - internal static string AvoidDefaultValueSwitchParameterName { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Positional Parameters + /// + internal static string AvoidUsingPositionalParametersCommonName { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Empty catch block is used. Please use Write-Error or throw statements in catch blocks.. - /// - internal static string AvoidEmptyCatchBlockError { - get { - return ResourceManager.GetString("AvoidEmptyCatchBlockError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. + /// + internal static string ProvideCommentHelpDescription { + get { + return ResourceManager.GetString("ProvideCommentHelpDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid global aliases.. - /// - internal static string AvoidGlobalAliasesCommonName { - get { - return ResourceManager.GetString("AvoidGlobalAliasesCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' does not have a help comment. + /// + internal static string ProvideCommentHelpError { + get { + return ResourceManager.GetString("ProvideCommentHelpError", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts.. - /// - internal static string AvoidGlobalAliasesDescription { - get { - return ResourceManager.GetString("AvoidGlobalAliasesDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Basic Comment Help + /// + internal static string ProvideCommentHelpCommonName { + get { + return ResourceManager.GetString("ProvideCommentHelpCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid creating aliases with a Global scope.. - /// - internal static string AvoidGlobalAliasesError { - get { - return ResourceManager.GetString("AvoidGlobalAliasesError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. + /// + internal static string UseApprovedVerbsDescription { + get { + return ResourceManager.GetString("UseApprovedVerbsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidGlobalAliases. - /// - internal static string AvoidGlobalAliasesName { - get { - return ResourceManager.GetString("AvoidGlobalAliasesName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses an unapproved verb. + /// + internal static string UseApprovedVerbsError { + get { + return ResourceManager.GetString("UseApprovedVerbsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid global functiosn and aliases. - /// - internal static string AvoidGlobalFunctionsCommonName { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cmdlet Verbs + /// + internal static string UseApprovedVerbsCommonName { + get { + return ResourceManager.GetString("UseApprovedVerbsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems.. - /// - internal static string AvoidGlobalFunctionsDescription { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Ensure declared variables are used elsewhere in the script and not just during assignment. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsDescription { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid creating functions with a Global scope.. - /// - internal static string AvoidGlobalFunctionsError { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The variable '{0}' is assigned but never used. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsError { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsError", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidGlobalFunctions. - /// - internal static string AvoidGlobalFunctionsName { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Extra Variables + /// + internal static string UseDeclaredVarsMoreThanAssignmentsCommonName { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to No Global Variables. - /// - internal static string AvoidGlobalVarsCommonName { - get { - return ResourceManager.GetString("AvoidGlobalVarsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. + /// + internal static string AvoidGlobalVarsDescription { + get { + return ResourceManager.GetString("AvoidGlobalVarsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems.. - /// - internal static string AvoidGlobalVarsDescription { - get { - return ResourceManager.GetString("AvoidGlobalVarsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Found global variable '{0}'. + /// + internal static string AvoidGlobalVarsError { + get { + return ResourceManager.GetString("AvoidGlobalVarsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Found global variable '{0}'.. - /// - internal static string AvoidGlobalVarsError { - get { - return ResourceManager.GetString("AvoidGlobalVarsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to No Global Variables + /// + internal static string AvoidGlobalVarsCommonName { + get { + return ResourceManager.GetString("AvoidGlobalVarsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidGlobalVars. - /// - internal static string AvoidGlobalVarsName { - get { - return ResourceManager.GetString("AvoidGlobalVarsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. + /// + internal static string PossibleIncorrectComparisonWithNullDescription { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Invoking Empty Members. - /// - internal static string AvoidInvokingEmptyMembersCommonName { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to $null should be on the left side of equality comparisons. + /// + internal static string PossibleIncorrectComparisonWithNullError { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullError", resourceCulture); } - - /// - /// Looks up a localized string similar to Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant.. - /// - internal static string AvoidInvokingEmptyMembersDescription { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Null Comparison + /// + internal static string PossibleIncorrectComparisonWithNullCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script.. - /// - internal static string AvoidInvokingEmptyMembersError { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that cmdlets and parameters have more than one character. + /// + internal static string OneCharDescription { + get { + return ResourceManager.GetString("OneCharDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidInvokingEmptyMembers. - /// - internal static string AvoidInvokingEmptyMembersName { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet name '{0}' only has one character. + /// + internal static string OneCharErrorCmdlet { + get { + return ResourceManager.GetString("OneCharErrorCmdlet", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid using null or empty HelpMessage parameter attribute.. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeCommonName { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' has a parameter '{1}' that only has one character. + /// + internal static string OneCharErrorParameter { + get { + return ResourceManager.GetString("OneCharErrorParameter", resourceCulture); } - - /// - /// Looks up a localized string similar to Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function.. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeDescription { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to A script block has a parameter '{0}' that only has one character. + /// + internal static string OneCharErrorParameterSB { + get { + return ResourceManager.GetString("OneCharErrorParameterSB", resourceCulture); } - - /// - /// Looks up a localized string similar to HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string.. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeError { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to One Char + /// + internal static string OneCharCommonName { + get { + return ResourceManager.GetString("OneCharCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidNullOrEmptyHelpMessageAttribute. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeName { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. + /// + internal static string UsePSCredentialTypeDescription { + get { + return ResourceManager.GetString("UsePSCredentialTypeDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using ShouldContinue Without Boolean Force Parameter. - /// - internal static string AvoidShouldContinueWithoutForceCommonName { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + /// + internal static string UsePSCredentialTypeError { + get { + return ResourceManager.GetString("UsePSCredentialTypeError", resourceCulture); } - - /// - /// Looks up a localized string similar to Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it.. - /// - internal static string AvoidShouldContinueWithoutForceDescription { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + /// + internal static string UsePSCredentialTypeErrorSB { + get { + return ResourceManager.GetString("UsePSCredentialTypeErrorSB", resourceCulture); } - - /// - /// Looks up a localized string similar to Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt. - /// - internal static string AvoidShouldContinueWithoutForceError { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use PSCredential type. + /// + internal static string UsePSCredentialTypeCommonName { + get { + return ResourceManager.GetString("UsePSCredentialTypeCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt. - /// - internal static string AvoidShouldContinueWithoutForceErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceErrorScriptDefinition", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. + /// + internal static string ReservedCmdletCharDescription { + get { + return ResourceManager.GetString("ReservedCmdletCharDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidShouldContinueWithoutForce. - /// - internal static string AvoidShouldContinueWithoutForceName { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses a reserved char in its name. + /// + internal static string ReservedCmdletCharError { + get { + return ResourceManager.GetString("ReservedCmdletCharError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid trailing whitespace. - /// - internal static string AvoidTrailingWhitespaceCommonName { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Reserved Cmdlet Chars + /// + internal static string ReservedCmdletCharCommonName { + get { + return ResourceManager.GetString("ReservedCmdletCharCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Each line should have no trailing whitespace.. - /// - internal static string AvoidTrailingWhitespaceDescription { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' + /// + internal static string ReservedParamsCmdletPrefix { + get { + return ResourceManager.GetString("ReservedParamsCmdletPrefix", resourceCulture); } - - /// - /// Looks up a localized string similar to Line has trailing whitespace. - /// - internal static string AvoidTrailingWhitespaceError { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. + /// + internal static string ReservedParamsDescription { + get { + return ResourceManager.GetString("ReservedParamsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidTrailingWhitespace. - /// - internal static string AvoidTrailingWhitespaceName { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' defines the reserved common parameter '{1}'. + /// + internal static string ReservedParamsError { + get { + return ResourceManager.GetString("ReservedParamsError", resourceCulture); } + } - /// - /// Looks up a localized string similar to AvoidLongLines. - /// - internal static string AvoidLongLinesName - { - get - { - return ResourceManager.GetString("AvoidLongLinesName", resourceCulture); - } + /// + /// Looks up a localized string similar to Reserved Parameters + /// + internal static string ReservedParamsCommonName { + get { + return ResourceManager.GetString("ReservedParamsCommonName", resourceCulture); } + } - /// - /// Looks up a localized string similar to Avoid long lines. - /// - internal static string AvoidLongLinesCommonName - { - get - { - return ResourceManager.GetString("AvoidLongLinesCommonName", resourceCulture); - } + /// + /// Looks up a localized string similar to The script + /// + internal static string ReservedParamsScriptPrefix { + get { + return ResourceManager.GetString("ReservedParamsScriptPrefix", resourceCulture); } + } - /// - /// Looks up a localized string similar to Each line should be under 120 characters. - /// - internal static string AvoidLongLinesDescription - { - get - { - return ResourceManager.GetString("AvoidLongLinesDescription", resourceCulture); - } + /// + /// Looks up a localized string similar to #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ + /// + internal static string ReserverCmdletChars { + get { + return ResourceManager.GetString("ReserverCmdletChars", resourceCulture); } + } - /// - /// Looks up a localized string similar to Line is longer than 120 characters. - /// - internal static string AvoidLongLinesError - { - get - { - return ResourceManager.GetString("AvoidLongLinesError", resourceCulture); - } + /// + /// Looks up a localized string similar to Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. + /// + internal static string ShouldProcessDescription { + get { + return ResourceManager.GetString("ShouldProcessDescription", resourceCulture); } + } - /// - /// Looks up a localized string similar to AvoidLongLines. - /// - internal static string AvoidLongLinesWhitespaceName - { - get - { - return ResourceManager.GetString("AvoidLongLinesName", resourceCulture); - } + /// + /// Looks up a localized string similar to '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + /// + internal static string ShouldProcessErrorHasAttribute { + get { + return ResourceManager.GetString("ShouldProcessErrorHasAttribute", resourceCulture); } - - /// - /// Looks up a localized string similar to Module Must Be Loadable. - /// - internal static string AvoidUnloadableModuleCommonName { - get { - return ResourceManager.GetString("AvoidUnloadableModuleCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + /// + internal static string ShouldProcessErrorHasAttributeSB { + get { + return ResourceManager.GetString("ShouldProcessErrorHasAttributeSB", resourceCulture); } - - /// - /// Looks up a localized string similar to If a script file is in a PowerShell module folder, then that folder must be loadable.. - /// - internal static string AvoidUnloadableModuleDescription { - get { - return ResourceManager.GetString("AvoidUnloadableModuleDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + /// + internal static string ShouldProcessErrorHasCmdlet { + get { + return ResourceManager.GetString("ShouldProcessErrorHasCmdlet", resourceCulture); } - - /// - /// Looks up a localized string similar to Cannot load the module '{0}' that file '{1}' is in.. - /// - internal static string AvoidUnloadableModuleError { - get { - return ResourceManager.GetString("AvoidUnloadableModuleError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + /// + internal static string ShouldProcessErrorHasCmdletSB { + get { + return ResourceManager.GetString("ShouldProcessErrorHasCmdletSB", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUnloadableModule. - /// - internal static string AvoidUnloadableModuleName { - get { - return ResourceManager.GetString("AvoidUnloadableModuleName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Should Process + /// + internal static string ShouldProcessCommonName { + get { + return ResourceManager.GetString("ShouldProcessCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Username and Password Parameters. - /// - internal static string AvoidUsernameAndPasswordParamsCommonName { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PS + /// + internal static string SourceName { + get { + return ResourceManager.GetString("SourceName", resourceCulture); } - - /// - /// Looks up a localized string similar to Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString.. - /// - internal static string AvoidUsernameAndPasswordParamsDescription { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. + /// + internal static string UseVerboseMessageInDSCResourceDescription { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute.. - /// - internal static string AvoidUsernameAndPasswordParamsError { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. + /// + internal static string UseVerboseMessageInDSCResourceErrorFunction { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceErrorFunction", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingUsernameAndPasswordParams. - /// - internal static string AvoidUsernameAndPasswordParamsName { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use verbose message in DSC resource + /// + internal static string UseVerboseMessageInDSCResourceCommonName { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Clear-Host. - /// - internal static string AvoidUsingClearHostCommonName { - get { - return ResourceManager.GetString("AvoidUsingClearHostCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Some fields of the module manifest (such as ModuleVersion) are required. + /// + internal static string MissingModuleManifestFieldDescription { + get { + return ResourceManager.GetString("MissingModuleManifestFieldDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all.. - /// - internal static string AvoidUsingClearHostDescription { - get { - return ResourceManager.GetString("AvoidUsingClearHostDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Module Manifest Fields + /// + internal static string MissingModuleManifestFieldCommonName { + get { + return ResourceManager.GetString("MissingModuleManifestFieldCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all.. - /// - internal static string AvoidUsingClearHostError { - get { - return ResourceManager.GetString("AvoidUsingClearHostError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to If a script file is in a PowerShell module folder, then that folder must be loadable. + /// + internal static string AvoidUnloadableModuleDescription { + get { + return ResourceManager.GetString("AvoidUnloadableModuleDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingClearHost. - /// - internal static string AvoidUsingClearHostName { - get { - return ResourceManager.GetString("AvoidUsingClearHostName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cannot load the module '{0}' that file '{1}' is in. + /// + internal static string AvoidUnloadableModuleError { + get { + return ResourceManager.GetString("AvoidUnloadableModuleError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix.. - /// - internal static string AvoidUsingCmdletAliasesCommonName { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Module Must Be Loadable + /// + internal static string AvoidUnloadableModuleCommonName { + get { + return ResourceManager.GetString("AvoidUnloadableModuleCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Replace {0} with {1}. - /// - internal static string AvoidUsingCmdletAliasesCorrectionDescription { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesCorrectionDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Error Message is Null. + /// + internal static string NullErrorMessage { + get { + return ResourceManager.GetString("NullErrorMessage", resourceCulture); } - - /// - /// Looks up a localized string similar to An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availa [rest of string was truncated]";. - /// - internal static string AvoidUsingCmdletAliasesDescription { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Password parameters that take in plaintext will expose passwords and compromise the security of your system. + /// + internal static string AvoidUsingPlainTextForPasswordDescription { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.. - /// - internal static string AvoidUsingCmdletAliasesError { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. + /// + internal static string AvoidUsingPlainTextForPasswordError { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordError", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name.. - /// - internal static string AvoidUsingCmdletAliasesMissingGetPrefixError { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesMissingGetPrefixError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Plain Text For Password Parameter + /// + internal static string AvoidUsingPlainTextForPasswordCommonName { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingCmdletAliases. - /// - internal static string AvoidUsingCmdletAliasesName { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Using ConvertTo-SecureString with plain text will expose secure information. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextDescription { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead.. - /// - internal static string AvoidUsingConsoleWriteError { - get { - return ResourceManager.GetString("AvoidUsingConsoleWriteError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextError { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using SecureString With Plain Text. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextCommonName { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using SecureString With Plain Text + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextCommonName { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Using ConvertTo-SecureString with plain text will expose secure information.. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextDescription { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Switch parameter should not default to true. + /// + internal static string AvoidDefaultValueSwitchParameterDescription { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead.. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextError { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' has a switch parameter default to true. + /// + internal static string AvoidDefaultValueSwitchParameterError { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterError", resourceCulture); } - - /// - /// Looks up a localized string similar to Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead.. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Switch Parameters Should Not Default To True + /// + internal static string AvoidDefaultValueSwitchParameterCommonName { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingConvertToSecureStringWithPlainText. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextName { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. + /// + internal static string AvoidShouldContinueWithoutForceDescription { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Deprecated Manifest Fields. - /// - internal static string AvoidUsingDeprecatedManifestFieldsCommonName { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + /// + internal static string AvoidShouldContinueWithoutForceError { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceError", resourceCulture); } - - /// - /// Looks up a localized string similar to "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency.. - /// - internal static string AvoidUsingDeprecatedManifestFieldsDescription { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using ShouldContinue Without Boolean Force Parameter + /// + internal static string AvoidShouldContinueWithoutForceCommonName { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingDeprecatedManifestFields. - /// - internal static string AvoidUsingDeprecatedManifestFieldsName { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. + /// + internal static string AvoidUsingClearHostDescription { + get { + return ResourceManager.GetString("AvoidUsingClearHostDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Empty Catch Block. - /// - internal static string AvoidUsingEmptyCatchBlockCommonName { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. + /// + internal static string AvoidUsingClearHostError { + get { + return ResourceManager.GetString("AvoidUsingClearHostError", resourceCulture); } - - /// - /// Looks up a localized string similar to Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks.. - /// - internal static string AvoidUsingEmptyCatchBlockDescription { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Clear-Host + /// + internal static string AvoidUsingClearHostCommonName { + get { + return ResourceManager.GetString("AvoidUsingClearHostCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingEmptyCatchBlock. - /// - internal static string AvoidUsingEmptyCatchBlockName { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. + /// + internal static string AvoidUsingConsoleWriteError { + get { + return ResourceManager.GetString("AvoidUsingConsoleWriteError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Internal URLs. - /// - internal static string AvoidUsingInternalURLsCommonName { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. + /// + internal static string AvoidUsingWriteHostDescription { + get { + return ResourceManager.GetString("AvoidUsingWriteHostDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Using Internal URLs in the scripts may cause security problems.. - /// - internal static string AvoidUsingInternalURLsDescription { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + /// + internal static string AvoidUsingWriteHostError { + get { + return ResourceManager.GetString("AvoidUsingWriteHostError", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure.. - /// - internal static string AvoidUsingInternalURLsError { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Write-Host + /// + internal static string AvoidUsingWriteHostCommonName { + get { + return ResourceManager.GetString("AvoidUsingWriteHostCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingInternalURLs. - /// - internal static string AvoidUsingInternalURLsName { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cmdlet should use singular instead of plural nouns. + /// + internal static string UseSingularNounsDescription { + get { + return ResourceManager.GetString("UseSingularNounsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead.. - /// - internal static string AvoidUsingInvokeExpressionError { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. + /// + internal static string UseSingularNounsError { + get { + return ResourceManager.GetString("UseSingularNounsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Invoke-Expression. - /// - internal static string AvoidUsingInvokeExpressionRuleCommonName { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cmdlet Singular Noun + /// + internal static string UseSingularNounsCommonName { + get { + return ResourceManager.GetString("UseSingularNounsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Exp [rest of string was truncated]";. - /// - internal static string AvoidUsingInvokeExpressionRuleDescription { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingCmdletAliases + /// + internal static string AvoidUsingCmdletAliasesName { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingInvokeExpression. - /// - internal static string AvoidUsingInvokeExpressionRuleName { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidDefaultValueSwitchParameter + /// + internal static string AvoidDefaultValueSwitchParameterName { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Plain Text For Password Parameter. - /// - internal static string AvoidUsingPlainTextForPasswordCommonName { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidGlobalVars + /// + internal static string AvoidGlobalVarsName { + get { + return ResourceManager.GetString("AvoidGlobalVarsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Set {0} type to SecureString. - /// - internal static string AvoidUsingPlainTextForPasswordCorrectionDescription { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCorrectionDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidShouldContinueWithoutForce + /// + internal static string AvoidShouldContinueWithoutForceName { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceName", resourceCulture); } - - /// - /// Looks up a localized string similar to Password parameters that take in plaintext will expose passwords and compromise the security of your system.. - /// - internal static string AvoidUsingPlainTextForPasswordDescription { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUnloadableModule + /// + internal static string AvoidUnloadableModuleName { + get { + return ResourceManager.GetString("AvoidUnloadableModuleName", resourceCulture); } - - /// - /// Looks up a localized string similar to Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information.. - /// - internal static string AvoidUsingPlainTextForPasswordError { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingClearHost + /// + internal static string AvoidUsingClearHostName { + get { + return ResourceManager.GetString("AvoidUsingClearHostName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingPlainTextForPassword. - /// - internal static string AvoidUsingPlainTextForPasswordName { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingConvertToSecureStringWithPlainText + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextName { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Positional Parameters. - /// - internal static string AvoidUsingPositionalParametersCommonName { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingEmptyCatchBlock + /// + internal static string AvoidUsingEmptyCatchBlockName { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockName", resourceCulture); } - - /// - /// Looks up a localized string similar to Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command.. - /// - internal static string AvoidUsingPositionalParametersDescription { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingInvokeExpression + /// + internal static string AvoidUsingInvokeExpressionRuleName { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleName", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command.. - /// - internal static string AvoidUsingPositionalParametersError { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingPlainTextForPassword + /// + internal static string AvoidUsingPlainTextForPasswordName { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingPositionalParameters. - /// - internal static string AvoidUsingPositionalParametersName { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingPositionalParameters + /// + internal static string AvoidUsingPositionalParametersName { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance. - /// - internal static string AvoidUsingWMICmdletCommonName { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingWriteHost + /// + internal static string AvoidUsingWriteHostName { + get { + return ResourceManager.GetString("AvoidUsingWriteHostName", resourceCulture); } - - /// - /// Looks up a localized string similar to Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets.. - /// - internal static string AvoidUsingWMICmdletDescription { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to OneChar + /// + internal static string OneCharName { + get { + return ResourceManager.GetString("OneCharName", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.. - /// - internal static string AvoidUsingWMICmdletError { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PossibleIncorrectComparisonWithNull + /// + internal static string PossibleIncorrectComparisonWithNullName { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullName", resourceCulture); } - - /// - /// Looks up a localized string similar to Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.. - /// - internal static string AvoidUsingWMICmdletErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletErrorScriptDefinition", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ProvideCommentHelp + /// + internal static string ProvideCommentHelpName { + get { + return ResourceManager.GetString("ProvideCommentHelpName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingWMICmdlet. - /// - internal static string AvoidUsingWMICmdletName { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ReservedCmdletChar + /// + internal static string ReservedCmdletCharName { + get { + return ResourceManager.GetString("ReservedCmdletCharName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid Using Write-Host. - /// - internal static string AvoidUsingWriteHostCommonName { - get { - return ResourceManager.GetString("AvoidUsingWriteHostCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ReservedParams + /// + internal static string ReservedParamsName { + get { + return ResourceManager.GetString("ReservedParamsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it.. - /// - internal static string AvoidUsingWriteHostDescription { - get { - return ResourceManager.GetString("AvoidUsingWriteHostDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ShouldProcess + /// + internal static string ShouldProcessName { + get { + return ResourceManager.GetString("ShouldProcessName", resourceCulture); } - - /// - /// Looks up a localized string similar to File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.. - /// - internal static string AvoidUsingWriteHostError { - get { - return ResourceManager.GetString("AvoidUsingWriteHostError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseApprovedVerbs + /// + internal static string UseApprovedVerbsName { + get { + return ResourceManager.GetString("UseApprovedVerbsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.. - /// - internal static string AvoidUsingWriteHostErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingWriteHostErrorScriptDefinition", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseDeclaredVarsMoreThanAssignments + /// + internal static string UseDeclaredVarsMoreThanAssignmentsName { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsName", resourceCulture); } - - /// - /// Looks up a localized string similar to AvoidUsingWriteHost. - /// - internal static string AvoidUsingWriteHostName { - get { - return ResourceManager.GetString("AvoidUsingWriteHostName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UsePSCredentialType + /// + internal static string UsePSCredentialTypeName { + get { + return ResourceManager.GetString("UsePSCredentialTypeName", resourceCulture); } - - /// - /// Looks up a localized string similar to Command Not Found. - /// - internal static string CommandNotFoundCommonName { - get { - return ResourceManager.GetString("CommandNotFoundCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseSingularNouns + /// + internal static string UseSingularNounsName { + get { + return ResourceManager.GetString("UseSingularNounsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Commands that are undefined or do not exist should not be used.. - /// - internal static string CommandNotFoundDescription { - get { - return ResourceManager.GetString("CommandNotFoundDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to MissingModuleManifestField + /// + internal static string MissingModuleManifestFieldName { + get { + return ResourceManager.GetString("MissingModuleManifestFieldName", resourceCulture); } - - /// - /// Looks up a localized string similar to Command '{0}' Is Not Found. - /// - internal static string CommandNotFoundError { - get { - return ResourceManager.GetString("CommandNotFoundError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseVerboseMessageInDSCResource + /// + internal static string UseVerboseMessageInDSCResourceName { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command Not Found + /// + internal static string CommandNotFoundCommonName { + get { + return ResourceManager.GetString("CommandNotFoundCommonName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Commands that are undefined or do not exist should not be used. + /// + internal static string CommandNotFoundDescription { + get { + return ResourceManager.GetString("CommandNotFoundDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command '{0}' Is Not Found + /// + internal static string CommandNotFoundError { + get { + return ResourceManager.GetString("CommandNotFoundError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CommandNotFound + /// + internal static string CommandNotFoundName { + get { + return ResourceManager.GetString("CommandNotFoundName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type Not Found + /// + internal static string TypeNotFoundCommonName { + get { + return ResourceManager.GetString("TypeNotFoundCommonName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Undefined type should not be used + /// + internal static string TypeNotFoundDescription { + get { + return ResourceManager.GetString("TypeNotFoundDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type '{0}' is not found. Please check that it is defined. + /// + internal static string TypeNotFoundError { + get { + return ResourceManager.GetString("TypeNotFoundError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to TypeNotFound + /// + internal static string TypeNotFoundName { + get { + return ResourceManager.GetString("TypeNotFoundName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use Cmdlet Correctly + /// + internal static string UseCmdletCorrectlyCommonName { + get { + return ResourceManager.GetString("UseCmdletCorrectlyCommonName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet should be called with the mandatory parameters. + /// + internal static string UseCmdletCorrectlyDescription { + get { + return ResourceManager.GetString("UseCmdletCorrectlyDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. + /// + internal static string UseCmdletCorrectlyError { + get { + return ResourceManager.GetString("UseCmdletCorrectlyError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UseCmdletCorrectly + /// + internal static string UseCmdletCorrectlyName { + get { + return ResourceManager.GetString("UseCmdletCorrectlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use Type At Variable Assignment + /// + internal static string UseTypeAtVariableAssignmentCommonName { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentCommonName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Types should be specified at variable assignments to maintain readability and maintainability of script. + /// + internal static string UseTypeAtVariableAssignmentDescription { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Specify type at the assignment of variable '{0}' + /// + internal static string UseTypeAtVariableAssignmentError { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UseTypeAtVariableAssignment + /// + internal static string UseTypeAtVariableAssignmentName { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Avoid Using Username and Password Parameters + /// + internal static string AvoidUsernameAndPasswordParamsCommonName { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsCommonName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. + /// + internal static string AvoidUsernameAndPasswordParamsDescription { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to CommandNotFound. - /// - internal static string CommandNotFoundName { - get { - return ResourceManager.GetString("CommandNotFoundName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. + /// + internal static string AvoidUsernameAndPasswordParamsError { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsError", resourceCulture); } - - /// - /// Looks up a localized string similar to DscExamplesPresent. - /// - internal static string DscExamplesPresent { - get { - return ResourceManager.GetString("DscExamplesPresent", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingUsernameAndPasswordParams + /// + internal static string AvoidUsernameAndPasswordParamsName { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsName", resourceCulture); } - - /// - /// Looks up a localized string similar to DSC examples are present. - /// - internal static string DscExamplesPresentCommonName { - get { - return ResourceManager.GetString("DscExamplesPresentCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Invoking Empty Members + /// + internal static string AvoidInvokingEmptyMembersCommonName { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title.. - /// - internal static string DscExamplesPresentDescription { - get { - return ResourceManager.GetString("DscExamplesPresentDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. + /// + internal static string AvoidInvokingEmptyMembersDescription { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to No examples found for resource '{0}'. - /// - internal static string DscExamplesPresentNoExamplesError { - get { - return ResourceManager.GetString("DscExamplesPresentNoExamplesError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. + /// + internal static string AvoidInvokingEmptyMembersError { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersError", resourceCulture); } - - /// - /// Looks up a localized string similar to PSDSC. - /// - internal static string DSCSourceName { - get { - return ResourceManager.GetString("DSCSourceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidInvokingEmptyMembers + /// + internal static string AvoidInvokingEmptyMembersName { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersName", resourceCulture); } - - /// - /// Looks up a localized string similar to DscTestsPresent. - /// - internal static string DscTestsPresent { - get { - return ResourceManager.GetString("DscTestsPresent", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using ComputerName Hardcoded + /// + internal static string AvoidComputerNameHardcodedCommonName { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Dsc tests are present. - /// - internal static string DscTestsPresentCommonName { - get { - return ResourceManager.GetString("DscTestsPresentCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. + /// + internal static string AvoidComputerNameHardcodedDescription { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name.. - /// - internal static string DscTestsPresentDescription { - get { - return ResourceManager.GetString("DscTestsPresentDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. + /// + internal static string AvoidComputerNameHardcodedError { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedError", resourceCulture); } - - /// - /// Looks up a localized string similar to No tests found for resource '{0}'. - /// - internal static string DscTestsPresentNoTestsError { - get { - return ResourceManager.GetString("DscTestsPresentNoTestsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingComputerNameHardcoded + /// + internal static string AvoidComputerNameHardcodedName { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedName", resourceCulture); } - - /// - /// Looks up a localized string similar to Misleading Backtick. - /// - internal static string MisleadingBacktickCommonName { - get { - return ResourceManager.GetString("MisleadingBacktickCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Empty catch block is used. Please use Write-Error or throw statements in catch blocks. + /// + internal static string AvoidEmptyCatchBlockError { + get { + return ResourceManager.GetString("AvoidEmptyCatchBlockError", resourceCulture); } - - /// - /// Looks up a localized string similar to Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace.. - /// - internal static string MisleadingBacktickDescription { - get { - return ResourceManager.GetString("MisleadingBacktickDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. + /// + internal static string AvoidUsingCmdletAliasesError { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesError", resourceCulture); } - - /// - /// Looks up a localized string similar to This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation?. - /// - internal static string MisleadingBacktickError { - get { - return ResourceManager.GetString("MisleadingBacktickError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. + /// + internal static string AvoidUsingInvokeExpressionError { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionError", resourceCulture); } - - /// - /// Looks up a localized string similar to MisleadingBacktick. - /// - internal static string MisleadingBacktickName { - get { - return ResourceManager.GetString("MisleadingBacktickName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. + /// + internal static string AvoidUsingPositionalParametersError { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersError", resourceCulture); } - - /// - /// Looks up a localized string similar to Module Manifest Fields. - /// - internal static string MissingModuleManifestFieldCommonName { - get { - return ResourceManager.GetString("MissingModuleManifestFieldCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to {0}{1} + /// + internal static string NameSpaceFormat { + get { + return ResourceManager.GetString("NameSpaceFormat", resourceCulture); } - - /// - /// Looks up a localized string similar to Add {0} = {1} to the module manifest. - /// - internal static string MissingModuleManifestFieldCorrectionDescription { - get { - return ResourceManager.GetString("MissingModuleManifestFieldCorrectionDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cannot process null Ast + /// + internal static string NullAstErrorMessage { + get { + return ResourceManager.GetString("NullAstErrorMessage", resourceCulture); } - - /// - /// Looks up a localized string similar to Some fields of the module manifest (such as ModuleVersion) are required.. - /// - internal static string MissingModuleManifestFieldDescription { - get { - return ResourceManager.GetString("MissingModuleManifestFieldDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cannot process null CommandInfo + /// + internal static string NullCommandInfoError { + get { + return ResourceManager.GetString("NullCommandInfoError", resourceCulture); } - - /// - /// Looks up a localized string similar to MissingModuleManifestField. - /// - internal static string MissingModuleManifestFieldName { - get { - return ResourceManager.GetString("MissingModuleManifestFieldName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PSDSC + /// + internal static string DSCSourceName { + get { + return ResourceManager.GetString("DSCSourceName", resourceCulture); } - - /// - /// Looks up a localized string similar to {0}{1}. - /// - internal static string NameSpaceFormat { - get { - return ResourceManager.GetString("NameSpaceFormat", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use Standard Get/Set/Test TargetResource functions in DSC Resource + /// + internal static string UseStandardDSCFunctionsInResourceCommonName { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Not all code path in {0} function in DSC Class {1} returns a value. - /// - internal static string NotAllCodePathReturnsDSCFunctionsError { - get { - return ResourceManager.GetString("NotAllCodePathReturnsDSCFunctionsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. + /// + internal static string UseStandardDSCFunctionsInResourceDescription { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Cannot process null Ast. - /// - internal static string NullAstErrorMessage { - get { - return ResourceManager.GetString("NullAstErrorMessage", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. + /// + internal static string UseStandardDSCFunctionsInResourceError { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceError", resourceCulture); } - - /// - /// Looks up a localized string similar to Cannot process null CommandInfo. - /// - internal static string NullCommandInfoError { - get { - return ResourceManager.GetString("NullCommandInfoError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to StandardDSCFunctionsInResource + /// + internal static string UseStandardDSCFunctionsInResourceName { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceName", resourceCulture); } - - /// - /// Looks up a localized string similar to Error Message is Null.. - /// - internal static string NullErrorMessage { - get { - return ResourceManager.GetString("NullErrorMessage", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Internal URLs + /// + internal static string AvoidUsingInternalURLsCommonName { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to One Char. - /// - internal static string OneCharCommonName { - get { - return ResourceManager.GetString("OneCharCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Using Internal URLs in the scripts may cause security problems. + /// + internal static string AvoidUsingInternalURLsDescription { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that cmdlets and parameters have more than one character.. - /// - internal static string OneCharDescription { - get { - return ResourceManager.GetString("OneCharDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. + /// + internal static string AvoidUsingInternalURLsError { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsError", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet name '{0}' only has one character.. - /// - internal static string OneCharErrorCmdlet { - get { - return ResourceManager.GetString("OneCharErrorCmdlet", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingInternalURLs + /// + internal static string AvoidUsingInternalURLsName { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsName", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' has a parameter '{1}' that only has one character.. - /// - internal static string OneCharErrorParameter { - get { - return ResourceManager.GetString("OneCharErrorParameter", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to www.sharepoint.com + /// + internal static string SharepointURL { + get { + return ResourceManager.GetString("SharepointURL", resourceCulture); } - - /// - /// Looks up a localized string similar to A script block has a parameter '{0}' that only has one character.. - /// - internal static string OneCharErrorParameterSB { - get { - return ResourceManager.GetString("OneCharErrorParameterSB", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use Identical Parameters For DSC Test and Set Functions + /// + internal static string UseIdenticalParametersDSCCommonName { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to OneChar. - /// - internal static string OneCharName { - get { - return ResourceManager.GetString("OneCharName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + /// + internal static string UseIdenticalParametersDSCDescription { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Place close braces. - /// - internal static string PlaceCloseBraceCommonName { - get { - return ResourceManager.GetString("PlaceCloseBraceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + /// + internal static string UseIdenticalParametersDSCError { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCError", resourceCulture); } - - /// - /// Looks up a localized string similar to Close brace should be on a new line by itself.. - /// - internal static string PlaceCloseBraceDescription { - get { - return ResourceManager.GetString("PlaceCloseBraceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseIdenticalParametersForDSC + /// + internal static string UseIdenticalParametersDSCName { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCName", resourceCulture); } - - /// - /// Looks up a localized string similar to Close brace is not on a new line.. - /// - internal static string PlaceCloseBraceErrorShouldBeOnNewLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldBeOnNewLine", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Missing '{0}' function. DSC Class must implement Get, Set and Test functions. + /// + internal static string UseStandardDSCFunctionsInClassError { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInClassError", resourceCulture); } - - /// - /// Looks up a localized string similar to Close brace before a branch statement is followed by a new line.. - /// - internal static string PlaceCloseBraceErrorShouldCuddleBranchStatement { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldCuddleBranchStatement", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions + /// + internal static string UseIdenticalMandatoryParametersDSCCommonName { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Close brace does not follow a new line.. - /// - internal static string PlaceCloseBraceErrorShouldFollowNewLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldFollowNewLine", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. + /// + internal static string UseIdenticalMandatoryParametersDSCDescription { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Close brace does not follow a non-empty line.. - /// - internal static string PlaceCloseBraceErrorShouldNotFollowEmptyLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldNotFollowEmptyLine", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). + /// + internal static string UseIdenticalMandatoryParametersDSCError { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCError", resourceCulture); } - - /// - /// Looks up a localized string similar to PlaceCloseBrace. - /// - internal static string PlaceCloseBraceName { - get { - return ResourceManager.GetString("PlaceCloseBraceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseIdenticalMandatoryParametersForDSC + /// + internal static string UseIdenticalMandatoryParametersDSCName { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCName", resourceCulture); } - - /// - /// Looks up a localized string similar to Place open braces consistently. - /// - internal static string PlaceOpenBraceCommonName { - get { - return ResourceManager.GetString("PlaceOpenBraceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Not all code path in {0} function in DSC Class {1} returns a value + /// + internal static string NotAllCodePathReturnsDSCFunctionsError { + get { + return ResourceManager.GetString("NotAllCodePathReturnsDSCFunctionsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Place open braces either on the same line as the preceding expression or on a new line.. - /// - internal static string PlaceOpenBraceDescription { - get { - return ResourceManager.GetString("PlaceOpenBraceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ReturnCorrectTypesForDSCFunctions + /// + internal static string ReturnCorrectTypeDSCFunctionsName { + get { + return ResourceManager.GetString("ReturnCorrectTypeDSCFunctionsName", resourceCulture); } - - /// - /// Looks up a localized string similar to There is no new line after open brace.. - /// - internal static string PlaceOpenBraceErrorNoNewLineAfterBrace { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorNoNewLineAfterBrace", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Return Correct Types For DSC Functions + /// + internal static string ReturnCorrectTypesForDSCFunctionsCommonName { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Open brace not on same line as preceding keyword. It should be on the same line.. - /// - internal static string PlaceOpenBraceErrorShouldBeOnSameLine { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorShouldBeOnSameLine", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. + /// + internal static string ReturnCorrectTypesForDSCFunctionsDescription { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Open brace is not on a new line.. - /// - internal static string PlaceOpenBraceErrorShouldNotBeOnSameLine { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorShouldNotBeOnSameLine", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} + /// + internal static string ReturnCorrectTypesForDSCFunctionsNoTypeError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsNoTypeError", resourceCulture); } - - /// - /// Looks up a localized string similar to PlaceOpenBrace. - /// - internal static string PlaceOpenBraceName { - get { - return ResourceManager.GetString("PlaceOpenBraceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} instead of type {3} + /// + internal static string ReturnCorrectTypesForDSCFunctionsWrongTypeError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsWrongTypeError", resourceCulture); } - - /// - /// Looks up a localized string similar to Null Comparison. - /// - internal static string PossibleIncorrectComparisonWithNullCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Set function in DSC Class {0} should not return anything + /// + internal static string ReturnCorrectTypesForSetFunctionsDSCError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForSetFunctionsDSCError", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case.. - /// - internal static string PossibleIncorrectComparisonWithNullDescription { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to {0} function in DSC Resource should return object of type {1} instead of {2} + /// + internal static string ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError", resourceCulture); } - - /// - /// Looks up a localized string similar to $null should be on the left side of equality comparisons.. - /// - internal static string PossibleIncorrectComparisonWithNullError { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Set-TargetResource function in DSC Resource should not output anything to the pipeline. + /// + internal static string ReturnCorrectTypesForSetTargetResourceFunctionsDSCError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForSetTargetResourceFunctionsDSCError", resourceCulture); } - - /// - /// Looks up a localized string similar to PossibleIncorrectComparisonWithNull. - /// - internal static string PossibleIncorrectComparisonWithNullName { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use ShouldProcess For State Changing Functions + /// + internal static string UseShouldProcessForStateChangingFunctionsCommonName { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use $null on the left hand side for safe comparison with $null.. - /// - internal static string PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. + /// + internal static string UseShouldProcessForStateChangingFunctionsDescrption { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsDescrption", resourceCulture); } - - /// - /// Looks up a localized string similar to '=' is not an assignment operator. Did you mean the equality operator '-eq'?. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. + /// + internal static string UseShouldProcessForStateChangingFunctionsError { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsError", resourceCulture); } - - /// - /// Looks up a localized string similar to '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements.. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorDescription { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseShouldProcessForStateChangingFunctions + /// + internal static string UseShouldProcessForStateChangingFunctionsName { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'.. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorError { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance + /// + internal static string AvoidUsingWMICmdletCommonName { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to PossibleIncorrectUsageOfAssignmentOperator. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. + /// + internal static string AvoidUsingWMICmdletDescription { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal).. - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + /// + internal static string AvoidUsingWMICmdletError { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletError", resourceCulture); } - - /// - /// Looks up a localized string similar to When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell.. - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorDescription { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingWMICmdlet + /// + internal static string AvoidUsingWMICmdletName { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletName", resourceCulture); } - - /// - /// Looks up a localized string similar to Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal).. - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorError { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use OutputType Correctly + /// + internal static string UseOutputTypeCorrectlyCommonName { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to PossibleIncorrectUsageOfRedirectionOperator. - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The return types of a cmdlet should be declared using the OutputType attribute. + /// + internal static string UseOutputTypeCorrectlyDescription { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Basic Comment Help. - /// - internal static string ProvideCommentHelpCommonName { - get { - return ResourceManager.GetString("ProvideCommentHelpCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. + /// + internal static string UseOutputTypeCorrectlyError { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyError", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment.. - /// - internal static string ProvideCommentHelpDescription { - get { - return ResourceManager.GetString("ProvideCommentHelpDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseOutputTypeCorrectly + /// + internal static string UseOutputTypeCorrectlyName { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyName", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' does not have a help comment.. - /// - internal static string ProvideCommentHelpError { - get { - return ResourceManager.GetString("ProvideCommentHelpError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to DscTestsPresent + /// + internal static string DscTestsPresent { + get { + return ResourceManager.GetString("DscTestsPresent", resourceCulture); } - - /// - /// Looks up a localized string similar to ProvideCommentHelp. - /// - internal static string ProvideCommentHelpName { - get { - return ResourceManager.GetString("ProvideCommentHelpName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Dsc tests are present + /// + internal static string DscTestsPresentCommonName { + get { + return ResourceManager.GetString("DscTestsPresentCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Reserved Cmdlet Chars. - /// - internal static string ReservedCmdletCharCommonName { - get { - return ResourceManager.GetString("ReservedCmdletCharCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. + /// + internal static string DscTestsPresentDescription { + get { + return ResourceManager.GetString("DscTestsPresentDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors.. - /// - internal static string ReservedCmdletCharDescription { - get { - return ResourceManager.GetString("ReservedCmdletCharDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to No tests found for resource '{0}' + /// + internal static string DscTestsPresentNoTestsError { + get { + return ResourceManager.GetString("DscTestsPresentNoTestsError", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses a reserved char in its name.. - /// - internal static string ReservedCmdletCharError { - get { - return ResourceManager.GetString("ReservedCmdletCharError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to DscExamplesPresent + /// + internal static string DscExamplesPresent { + get { + return ResourceManager.GetString("DscExamplesPresent", resourceCulture); } - - /// - /// Looks up a localized string similar to ReservedCmdletChar. - /// - internal static string ReservedCmdletCharName { - get { - return ResourceManager.GetString("ReservedCmdletCharName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to DSC examples are present + /// + internal static string DscExamplesPresentCommonName { + get { + return ResourceManager.GetString("DscExamplesPresentCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}'. - /// - internal static string ReservedParamsCmdletPrefix { - get { - return ResourceManager.GetString("ReservedParamsCmdletPrefix", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. + /// + internal static string DscExamplesPresentDescription { + get { + return ResourceManager.GetString("DscExamplesPresentDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Reserved Parameters. - /// - internal static string ReservedParamsCommonName { - get { - return ResourceManager.GetString("ReservedParamsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to No examples found for resource '{0}' + /// + internal static string DscExamplesPresentNoExamplesError { + get { + return ResourceManager.GetString("DscExamplesPresentNoExamplesError", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs.. - /// - internal static string ReservedParamsDescription { - get { - return ResourceManager.GetString("ReservedParamsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Default Value For Mandatory Parameter + /// + internal static string AvoidDefaultValueForMandatoryParameterCommonName { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' defines the reserved common parameter '{1}'.. - /// - internal static string ReservedParamsError { - get { - return ResourceManager.GetString("ReservedParamsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. + /// + internal static string AvoidDefaultValueForMandatoryParameterDescription { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to ReservedParams. - /// - internal static string ReservedParamsName { - get { - return ResourceManager.GetString("ReservedParamsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. + /// + internal static string AvoidDefaultValueForMandatoryParameterError { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterError", resourceCulture); } - - /// - /// Looks up a localized string similar to The script. - /// - internal static string ReservedParamsScriptPrefix { - get { - return ResourceManager.GetString("ReservedParamsScriptPrefix", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidDefaultValueForMandatoryParameter + /// + internal static string AvoidDefaultValueForMandatoryParameterName { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterName", resourceCulture); } - - /// - /// Looks up a localized string similar to #,(){}[]&/\\$^;:\"'<>|?@`*%+=~. - /// - internal static string ReserverCmdletChars { - get { - return ResourceManager.GetString("ReserverCmdletChars", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid Using Deprecated Manifest Fields + /// + internal static string AvoidUsingDeprecatedManifestFieldsCommonName { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to ReturnCorrectTypesForDSCFunctions. - /// - internal static string ReturnCorrectTypeDSCFunctionsName { - get { - return ResourceManager.GetString("ReturnCorrectTypeDSCFunctionsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. + /// + internal static string AvoidUsingDeprecatedManifestFieldsDescription { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Return Correct Types For DSC Functions. - /// - internal static string ReturnCorrectTypesForDSCFunctionsCommonName { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidUsingDeprecatedManifestFields + /// + internal static string AvoidUsingDeprecatedManifestFieldsName { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean.. - /// - internal static string ReturnCorrectTypesForDSCFunctionsDescription { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use UTF8 Encoding For Help File + /// + internal static string UseUTF8EncodingForHelpFileCommonName { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2}. - /// - internal static string ReturnCorrectTypesForDSCFunctionsNoTypeError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsNoTypeError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PowerShell help file needs to use UTF8 Encoding. + /// + internal static string UseUTF8EncodingForHelpFileDescription { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} instead of type {3}. - /// - internal static string ReturnCorrectTypesForDSCFunctionsWrongTypeError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsWrongTypeError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. + /// + internal static string UseUTF8EncodingForHelpFileError { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileError", resourceCulture); } - - /// - /// Looks up a localized string similar to {0} function in DSC Resource should return object of type {1} instead of {2}. - /// - internal static string ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseUTF8EncodingForHelpFile + /// + internal static string UseUTF8EncodingForHelpFileName { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileName", resourceCulture); } - - /// - /// Looks up a localized string similar to Set function in DSC Class {0} should not return anything. - /// - internal static string ReturnCorrectTypesForSetFunctionsDSCError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForSetFunctionsDSCError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use BOM encoding for non-ASCII files + /// + internal static string UseBOMForUnicodeEncodedFileCommonName { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Set-TargetResource function in DSC Resource should not output anything to the pipeline.. - /// - internal static string ReturnCorrectTypesForSetTargetResourceFunctionsDSCError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForSetTargetResourceFunctionsDSCError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. + /// + internal static string UseBOMForUnicodeEncodedFileDescription { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to ScriptDefinition. - /// - internal static string ScriptDefinitionName { - get { - return ResourceManager.GetString("ScriptDefinitionName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Missing BOM encoding for non-ASCII encoded file '{0}' + /// + internal static string UseBOMForUnicodeEncodedFileError { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileError", resourceCulture); } - - /// - /// Looks up a localized string similar to www.sharepoint.com. - /// - internal static string SharepointURL { - get { - return ResourceManager.GetString("SharepointURL", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseBOMForUnicodeEncodedFile + /// + internal static string UseBOMForUnicodeEncodedFileName { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileName", resourceCulture); } - - /// - /// Looks up a localized string similar to Should Process. - /// - internal static string ShouldProcessCommonName { - get { - return ResourceManager.GetString("ShouldProcessCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Script definition has a switch parameter default to true. + /// + internal static string AvoidDefaultValueSwitchParameterErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterErrorScriptDefinition", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior.. - /// - internal static string ShouldProcessDescription { - get { - return ResourceManager.GetString("ShouldProcessDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + /// + internal static string AvoidShouldContinueWithoutForceErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceErrorScriptDefinition", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.. - /// - internal static string ShouldProcessErrorHasAttribute { - get { - return ResourceManager.GetString("ShouldProcessErrorHasAttribute", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition", resourceCulture); } - - /// - /// Looks up a localized string similar to A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.. - /// - internal static string ShouldProcessErrorHasAttributeSB { - get { - return ResourceManager.GetString("ShouldProcessErrorHasAttributeSB", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + /// + internal static string AvoidUsingWMICmdletErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletErrorScriptDefinition", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute.. - /// - internal static string ShouldProcessErrorHasCmdlet { - get { - return ResourceManager.GetString("ShouldProcessErrorHasCmdlet", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + /// + internal static string AvoidUsingWriteHostErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingWriteHostErrorScriptDefinition", resourceCulture); } - - /// - /// Looks up a localized string similar to A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute.. - /// - internal static string ShouldProcessErrorHasCmdletSB { - get { - return ResourceManager.GetString("ShouldProcessErrorHasCmdletSB", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to ScriptDefinition + /// + internal static string ScriptDefinitionName { + get { + return ResourceManager.GetString("ScriptDefinitionName", resourceCulture); } - - /// - /// Looks up a localized string similar to ShouldProcess. - /// - internal static string ShouldProcessName { - get { - return ResourceManager.GetString("ShouldProcessName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Misleading Backtick + /// + internal static string MisleadingBacktickCommonName { + get { + return ResourceManager.GetString("MisleadingBacktickCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to PS. - /// - internal static string SourceName { - get { - return ResourceManager.GetString("SourceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. + /// + internal static string MisleadingBacktickDescription { + get { + return ResourceManager.GetString("MisleadingBacktickDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Type Not Found. - /// - internal static string TypeNotFoundCommonName { - get { - return ResourceManager.GetString("TypeNotFoundCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to MisleadingBacktick + /// + internal static string MisleadingBacktickName { + get { + return ResourceManager.GetString("MisleadingBacktickName", resourceCulture); } - - /// - /// Looks up a localized string similar to Undefined type should not be used. - /// - internal static string TypeNotFoundDescription { - get { - return ResourceManager.GetString("TypeNotFoundDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? + /// + internal static string MisleadingBacktickError { + get { + return ResourceManager.GetString("MisleadingBacktickError", resourceCulture); } - - /// - /// Looks up a localized string similar to Type '{0}' is not found. Please check that it is defined.. - /// - internal static string TypeNotFoundError { - get { - return ResourceManager.GetString("TypeNotFoundError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid using null or empty HelpMessage parameter attribute. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeCommonName { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to TypeNotFound. - /// - internal static string TypeNotFoundName { - get { - return ResourceManager.GetString("TypeNotFoundName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeDescription { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet Verbs. - /// - internal static string UseApprovedVerbsCommonName { - get { - return ResourceManager.GetString("UseApprovedVerbsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeError { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeError", resourceCulture); } - - /// - /// Looks up a localized string similar to Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices.. - /// - internal static string UseApprovedVerbsDescription { - get { - return ResourceManager.GetString("UseApprovedVerbsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidNullOrEmptyHelpMessageAttribute + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeName { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeName", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses an unapproved verb.. - /// - internal static string UseApprovedVerbsError { - get { - return ResourceManager.GetString("UseApprovedVerbsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use the *ToExport module manifest fields. + /// + internal static string UseToExportFieldsInManifestCommonName { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseApprovedVerbs. - /// - internal static string UseApprovedVerbsName { - get { - return ResourceManager.GetString("UseApprovedVerbsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. + /// + internal static string UseToExportFieldsInManifestDescription { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use BOM encoding for non-ASCII files. - /// - internal static string UseBOMForUnicodeEncodedFileCommonName { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Do not use wildcard or $null in this field. Explicitly specify a list for {0}. + /// + internal static string UseToExportFieldsInManifestError { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestError", resourceCulture); } - - /// - /// Looks up a localized string similar to For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly.. - /// - internal static string UseBOMForUnicodeEncodedFileDescription { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseToExportFieldsInManifest + /// + internal static string UseToExportFieldsInManifestName { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestName", resourceCulture); } - - /// - /// Looks up a localized string similar to Missing BOM encoding for non-ASCII encoded file '{0}'. - /// - internal static string UseBOMForUnicodeEncodedFileError { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Replace {0} with {1} + /// + internal static string AvoidUsingCmdletAliasesCorrectionDescription { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesCorrectionDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to UseBOMForUnicodeEncodedFile. - /// - internal static string UseBOMForUnicodeEncodedFileName { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Set {0} type to SecureString + /// + internal static string AvoidUsingPlainTextForPasswordCorrectionDescription { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCorrectionDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use Cmdlet Correctly. - /// - internal static string UseCmdletCorrectlyCommonName { - get { - return ResourceManager.GetString("UseCmdletCorrectlyCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Add {0} = {1} to the module manifest + /// + internal static string MissingModuleManifestFieldCorrectionDescription { + get { + return ResourceManager.GetString("MissingModuleManifestFieldCorrectionDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet should be called with the mandatory parameters.. - /// - internal static string UseCmdletCorrectlyDescription { - get { - return ResourceManager.GetString("UseCmdletCorrectlyDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Replace {0} with {1} + /// + internal static string UseToExportFieldsInManifestCorrectionDescription { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestCorrectionDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied.. - /// - internal static string UseCmdletCorrectlyError { - get { - return ResourceManager.GetString("UseCmdletCorrectlyError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Create hashtables with literal initializers + /// + internal static string UseLiteralInitilializerForHashtableCommonName { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCmdletCorrectly. - /// - internal static string UseCmdletCorrectlyName { - get { - return ResourceManager.GetString("UseCmdletCorrectlyName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default + /// + internal static string UseLiteralInitilializerForHashtableDescription { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use compatible cmdlets. - /// - internal static string UseCompatibleCmdletsCommonName { - get { - return ResourceManager.GetString("UseCompatibleCmdletsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Create hashtables with literal initliazers + /// + internal static string UseLiteralInitilializerForHashtableError { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use cmdlets compatible with the given PowerShell version and edition and operating system. - /// - internal static string UseCompatibleCmdletsDescription { - get { - return ResourceManager.GetString("UseCompatibleCmdletsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseLiteralInitializerForHashtable + /// + internal static string UseLiteralInitilializerForHashtableName { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableName", resourceCulture); } - - /// - /// Looks up a localized string similar to '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}'. - /// - internal static string UseCompatibleCmdletsError { - get { - return ResourceManager.GetString("UseCompatibleCmdletsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseCompatibleCmdlets + /// + internal static string UseCompatibleCmdletsName { + get { + return ResourceManager.GetString("UseCompatibleCmdletsName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCompatibleCmdlets. - /// - internal static string UseCompatibleCmdletsName { - get { - return ResourceManager.GetString("UseCompatibleCmdletsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use compatible cmdlets + /// + internal static string UseCompatibleCmdletsCommonName { + get { + return ResourceManager.GetString("UseCompatibleCmdletsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. - /// - internal static string UseCompatibleCommandsCommandError { - get { - return ResourceManager.GetString("UseCompatibleCommandsCommandError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use cmdlets compatible with the given PowerShell version and edition and operating system + /// + internal static string UseCompatibleCmdletsDescription { + get { + return ResourceManager.GetString("UseCompatibleCmdletsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use compatible commands. - /// - internal static string UseCompatibleCommandsCommonName { - get { - return ResourceManager.GetString("UseCompatibleCommandsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' + /// + internal static string UseCompatibleCmdletsError { + get { + return ResourceManager.GetString("UseCompatibleCmdletsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use commands compatible with the given PowerShell version and operating system. - /// - internal static string UseCompatibleCommandsDescription { - get { - return ResourceManager.GetString("UseCompatibleCommandsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseCompatibleCommands + /// + internal static string UseCompatibleCommandsName { + get { + return ResourceManager.GetString("UseCompatibleCommandsName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCompatibleCommands. - /// - internal static string UseCompatibleCommandsName { - get { - return ResourceManager.GetString("UseCompatibleCommandsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use compatible commands + /// + internal static string UseCompatibleCommandsCommonName { + get { + return ResourceManager.GetString("UseCompatibleCommandsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}'. - /// - internal static string UseCompatibleCommandsParameterError { - get { - return ResourceManager.GetString("UseCompatibleCommandsParameterError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use commands compatible with the given PowerShell version and operating system + /// + internal static string UseCompatibleCommandsDescription { + get { + return ResourceManager.GetString("UseCompatibleCommandsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use compatible syntax. - /// - internal static string UseCompatibleSyntaxCommonName { - get { - return ResourceManager.GetString("UseCompatibleSyntaxCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + /// + internal static string UseCompatibleCommandsCommandError { + get { + return ResourceManager.GetString("UseCompatibleCommandsCommandError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use the '{0}' syntax instead for compatibility with PowerShell versions {1}. - /// - internal static string UseCompatibleSyntaxCorrection { - get { - return ResourceManager.GetString("UseCompatibleSyntaxCorrection", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' + /// + internal static string UseCompatibleCommandsParameterError { + get { + return ResourceManager.GetString("UseCompatibleCommandsParameterError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use script syntax compatible with the given PowerShell versions. - /// - internal static string UseCompatibleSyntaxDescription { - get { - return ResourceManager.GetString("UseCompatibleSyntaxDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseCompatibleTypes + /// + internal static string UseCompatibleTypesName { + get { + return ResourceManager.GetString("UseCompatibleTypesName", resourceCulture); } - - /// - /// Looks up a localized string similar to The {0} syntax '{1}' is not available by default in PowerShell versions {2}. - /// - internal static string UseCompatibleSyntaxError { - get { - return ResourceManager.GetString("UseCompatibleSyntaxError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use compatible types + /// + internal static string UseCompatibleTypesCommonName { + get { + return ResourceManager.GetString("UseCompatibleTypesCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCompatibleSyntax. - /// - internal static string UseCompatibleSyntaxName { - get { - return ResourceManager.GetString("UseCompatibleSyntaxName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use types compatible with the given PowerShell version and operating system + /// + internal static string UseCompatibleTypesDescription { + get { + return ResourceManager.GetString("UseCompatibleTypesDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use compatible types. - /// - internal static string UseCompatibleTypesCommonName { - get { - return ResourceManager.GetString("UseCompatibleTypesCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + /// + internal static string UseCompatibleTypesTypeError { + get { + return ResourceManager.GetString("UseCompatibleTypesTypeError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use types compatible with the given PowerShell version and operating system. - /// - internal static string UseCompatibleTypesDescription { - get { - return ResourceManager.GetString("UseCompatibleTypesDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + /// + internal static string UseCompatibleTypesMethodError { + get { + return ResourceManager.GetString("UseCompatibleTypesMethodError", resourceCulture); } - - /// - /// Looks up a localized string similar to The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}'. - /// - internal static string UseCompatibleTypesMemberError { - get { - return ResourceManager.GetString("UseCompatibleTypesMemberError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + /// + internal static string UseCompatibleTypesMemberError { + get { + return ResourceManager.GetString("UseCompatibleTypesMemberError", resourceCulture); } - - /// - /// Looks up a localized string similar to The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}'. - /// - internal static string UseCompatibleTypesMethodError { - get { - return ResourceManager.GetString("UseCompatibleTypesMethodError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseCompatibleSyntax + /// + internal static string UseCompatibleSyntaxName { + get { + return ResourceManager.GetString("UseCompatibleSyntaxName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCompatibleTypes. - /// - internal static string UseCompatibleTypesName { - get { - return ResourceManager.GetString("UseCompatibleTypesName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use compatible syntax + /// + internal static string UseCompatibleSyntaxCommonName { + get { + return ResourceManager.GetString("UseCompatibleSyntaxCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. - /// - internal static string UseCompatibleTypesTypeAcceleratorError { - get { - return ResourceManager.GetString("UseCompatibleTypesTypeAcceleratorError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use script syntax compatible with the given PowerShell versions + /// + internal static string UseCompatibleSyntaxDescription { + get { + return ResourceManager.GetString("UseCompatibleSyntaxDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. - /// - internal static string UseCompatibleTypesTypeError { - get { - return ResourceManager.GetString("UseCompatibleTypesTypeError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The {0} syntax '{1}' is not available by default in PowerShell versions {2} + /// + internal static string UseCompatibleSyntaxError { + get { + return ResourceManager.GetString("UseCompatibleSyntaxError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use consistent indentation. - /// - internal static string UseConsistentIndentationCommonName { - get { - return ResourceManager.GetString("UseConsistentIndentationCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use the '{0}' syntax instead for compatibility with PowerShell versions {1} + /// + internal static string UseCompatibleSyntaxCorrection { + get { + return ResourceManager.GetString("UseCompatibleSyntaxCorrection", resourceCulture); } - - /// - /// Looks up a localized string similar to Each statement block should have a consistent indenation.. - /// - internal static string UseConsistentIndentationDescription { - get { - return ResourceManager.GetString("UseConsistentIndentationDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + /// + internal static string UseCompatibleTypesTypeAcceleratorError { + get { + return ResourceManager.GetString("UseCompatibleTypesTypeAcceleratorError", resourceCulture); } - - /// - /// Looks up a localized string similar to Indentation not consistent. - /// - internal static string UseConsistentIndentationError { - get { - return ResourceManager.GetString("UseConsistentIndentationError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid global functiosn and aliases + /// + internal static string AvoidGlobalFunctionsCommonName { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseConsistentIndentation. - /// - internal static string UseConsistentIndentationName { - get { - return ResourceManager.GetString("UseConsistentIndentationName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. + /// + internal static string AvoidGlobalFunctionsDescription { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use whitespaces. - /// - internal static string UseConsistentWhitespaceCommonName { - get { - return ResourceManager.GetString("UseConsistentWhitespaceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid creating functions with a Global scope. + /// + internal static string AvoidGlobalFunctionsError { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsError", resourceCulture); } - - /// - /// Looks up a localized string similar to Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';'). - /// - internal static string UseConsistentWhitespaceDescription { - get { - return ResourceManager.GetString("UseConsistentWhitespaceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidGlobalFunctions + /// + internal static string AvoidGlobalFunctionsName { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space after open brace.. - /// - internal static string UseConsistentWhitespaceErrorAfterOpeningBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorAfterOpeningBrace", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid global aliases. + /// + internal static string AvoidGlobalAliasesCommonName { + get { + return ResourceManager.GetString("AvoidGlobalAliasesCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space before closing brace.. - /// - internal static string UseConsistentWhitespaceErrorBeforeClosingInnerBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeClosingInnerBrace", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. + /// + internal static string AvoidGlobalAliasesDescription { + get { + return ResourceManager.GetString("AvoidGlobalAliasesDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space before open brace.. - /// - internal static string UseConsistentWhitespaceErrorBeforeOpeningBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeOpeningBrace", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid creating aliases with a Global scope. + /// + internal static string AvoidGlobalAliasesError { + get { + return ResourceManager.GetString("AvoidGlobalAliasesError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space before open parenthesis.. - /// - internal static string UseConsistentWhitespaceErrorBeforeParen { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeParen", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidGlobalAliases + /// + internal static string AvoidGlobalAliasesName { + get { + return ResourceManager.GetString("AvoidGlobalAliasesName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space before and after binary and assignment operators.. - /// - internal static string UseConsistentWhitespaceErrorOperator { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorOperator", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidTrailingWhitespace + /// + internal static string AvoidTrailingWhitespaceName { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space after a comma.. - /// - internal static string UseConsistentWhitespaceErrorSeparatorComma { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorComma", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid trailing whitespace + /// + internal static string AvoidTrailingWhitespaceCommonName { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space after a semicolon.. - /// - internal static string UseConsistentWhitespaceErrorSeparatorSemi { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorSemi", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Each line should have no trailing whitespace. + /// + internal static string AvoidTrailingWhitespaceDescription { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space after pipe.. - /// - internal static string UseConsistentWhitespaceErrorSpaceAfterPipe { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceAfterPipe", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Line has trailing whitespace + /// + internal static string AvoidTrailingWhitespaceError { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use space before pipe.. - /// - internal static string UseConsistentWhitespaceErrorSpaceBeforePipe { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceBeforePipe", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidLongLines + /// + internal static string AvoidLongLinesName { + get { + return ResourceManager.GetString("AvoidLongLinesName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseConsistentWhitespace. - /// - internal static string UseConsistentWhitespaceName { - get { - return ResourceManager.GetString("UseConsistentWhitespaceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Avoid long lines + /// + internal static string AvoidLongLinesCommonName { + get { + return ResourceManager.GetString("AvoidLongLinesCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use exact casing of cmdlet/function name.. - /// - internal static string UseCorrectCasingCommonName { - get { - return ResourceManager.GetString("UseCorrectCasingCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Line lengths should be less than the configured maximum + /// + internal static string AvoidLongLinesDescription { + get { + return ResourceManager.GetString("AvoidLongLinesDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to For better readability and consistency, use the exact casing of the cmdlet/function.. - /// - internal static string UseCorrectCasingDescription { - get { - return ResourceManager.GetString("UseCorrectCasingDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Line exceeds the configured maximum length of {0} characters + /// + internal static string AvoidLongLinesError { + get { + return ResourceManager.GetString("AvoidLongLinesError", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet/Function does not match its exact casing '{0}'.. - /// - internal static string UseCorrectCasingError { - get { - return ResourceManager.GetString("UseCorrectCasingError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PlaceOpenBrace + /// + internal static string PlaceOpenBraceName { + get { + return ResourceManager.GetString("PlaceOpenBraceName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseCorrectCasing. - /// - internal static string UseCorrectCasingName { - get { - return ResourceManager.GetString("UseCorrectCasingName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Place open braces consistently + /// + internal static string PlaceOpenBraceCommonName { + get { + return ResourceManager.GetString("PlaceOpenBraceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Extra Variables. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsCommonName { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Place open braces either on the same line as the preceding expression or on a new line. + /// + internal static string PlaceOpenBraceDescription { + get { + return ResourceManager.GetString("PlaceOpenBraceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Ensure declared variables are used elsewhere in the script and not just during assignment.. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsDescription { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Open brace not on same line as preceding keyword. It should be on the same line. + /// + internal static string PlaceOpenBraceErrorShouldBeOnSameLine { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorShouldBeOnSameLine", resourceCulture); } - - /// - /// Looks up a localized string similar to The variable '{0}' is assigned but never used.. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsError { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Open brace is not on a new line. + /// + internal static string PlaceOpenBraceErrorShouldNotBeOnSameLine { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorShouldNotBeOnSameLine", resourceCulture); } - - /// - /// Looks up a localized string similar to UseDeclaredVarsMoreThanAssignments. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsName { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to There is no new line after open brace. + /// + internal static string PlaceOpenBraceErrorNoNewLineAfterBrace { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorNoNewLineAfterBrace", resourceCulture); } - - /// - /// Looks up a localized string similar to Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions. - /// - internal static string UseIdenticalMandatoryParametersDSCCommonName { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PlaceCloseBrace + /// + internal static string PlaceCloseBraceName { + get { + return ResourceManager.GetString("PlaceCloseBraceName", resourceCulture); } - - /// - /// Looks up a localized string similar to The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters.. - /// - internal static string UseIdenticalMandatoryParametersDSCDescription { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Place close braces + /// + internal static string PlaceCloseBraceCommonName { + get { + return ResourceManager.GetString("PlaceCloseBraceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s).. - /// - internal static string UseIdenticalMandatoryParametersDSCError { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Close brace should be on a new line by itself. + /// + internal static string PlaceCloseBraceDescription { + get { + return ResourceManager.GetString("PlaceCloseBraceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to UseIdenticalMandatoryParametersForDSC. - /// - internal static string UseIdenticalMandatoryParametersDSCName { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Close brace is not on a new line. + /// + internal static string PlaceCloseBraceErrorShouldBeOnNewLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldBeOnNewLine", resourceCulture); } - - /// - /// Looks up a localized string similar to Use Identical Parameters For DSC Test and Set Functions. - /// - internal static string UseIdenticalParametersDSCCommonName { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Close brace does not follow a non-empty line. + /// + internal static string PlaceCloseBraceErrorShouldNotFollowEmptyLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldNotFollowEmptyLine", resourceCulture); } - - /// - /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters.. - /// - internal static string UseIdenticalParametersDSCDescription { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Close brace does not follow a new line. + /// + internal static string PlaceCloseBraceErrorShouldFollowNewLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldFollowNewLine", resourceCulture); } - - /// - /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters.. - /// - internal static string UseIdenticalParametersDSCError { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Close brace before a branch statement is followed by a new line. + /// + internal static string PlaceCloseBraceErrorShouldCuddleBranchStatement { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldCuddleBranchStatement", resourceCulture); } - - /// - /// Looks up a localized string similar to UseIdenticalParametersForDSC. - /// - internal static string UseIdenticalParametersDSCName { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseConsistentIndentation + /// + internal static string UseConsistentIndentationName { + get { + return ResourceManager.GetString("UseConsistentIndentationName", resourceCulture); } - - /// - /// Looks up a localized string similar to Create hashtables with literal initializers. - /// - internal static string UseLiteralInitilializerForHashtableCommonName { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use consistent indentation + /// + internal static string UseConsistentIndentationCommonName { + get { + return ResourceManager.GetString("UseConsistentIndentationCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default. - /// - internal static string UseLiteralInitilializerForHashtableDescription { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Each statement block should have a consistent indenation. + /// + internal static string UseConsistentIndentationDescription { + get { + return ResourceManager.GetString("UseConsistentIndentationDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Create hashtables with literal initliazers. - /// - internal static string UseLiteralInitilializerForHashtableError { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Indentation not consistent + /// + internal static string UseConsistentIndentationError { + get { + return ResourceManager.GetString("UseConsistentIndentationError", resourceCulture); } - - /// - /// Looks up a localized string similar to UseLiteralInitializerForHashtable. - /// - internal static string UseLiteralInitilializerForHashtableName { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseConsistentWhitespace + /// + internal static string UseConsistentWhitespaceName { + get { + return ResourceManager.GetString("UseConsistentWhitespaceName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use OutputType Correctly. - /// - internal static string UseOutputTypeCorrectlyCommonName { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use whitespaces + /// + internal static string UseConsistentWhitespaceCommonName { + get { + return ResourceManager.GetString("UseConsistentWhitespaceCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to The return types of a cmdlet should be declared using the OutputType attribute.. - /// - internal static string UseOutputTypeCorrectlyDescription { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') + /// + internal static string UseConsistentWhitespaceDescription { + get { + return ResourceManager.GetString("UseConsistentWhitespaceDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute.. - /// - internal static string UseOutputTypeCorrectlyError { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space before open brace. + /// + internal static string UseConsistentWhitespaceErrorBeforeOpeningBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeOpeningBrace", resourceCulture); } - - /// - /// Looks up a localized string similar to UseOutputTypeCorrectly. - /// - internal static string UseOutputTypeCorrectlyName { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space before open parenthesis. + /// + internal static string UseConsistentWhitespaceErrorBeforeParen { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeParen", resourceCulture); } - - /// - /// Looks up a localized string similar to Use PSCredential type.. - /// - internal static string UsePSCredentialTypeCommonName { - get { - return ResourceManager.GetString("UsePSCredentialTypeCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space before and after binary and assignment operators. + /// + internal static string UseConsistentWhitespaceErrorOperator { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorOperator", resourceCulture); } - - /// - /// Looks up a localized string similar to For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. . - /// - internal static string UsePSCredentialTypeDescription { - get { - return ResourceManager.GetString("UsePSCredentialTypeDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space after a comma. + /// + internal static string UseConsistentWhitespaceErrorSeparatorComma { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorComma", resourceCulture); } - - /// - /// Looks up a localized string similar to The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute.. - /// - internal static string UsePSCredentialTypeError { - get { - return ResourceManager.GetString("UsePSCredentialTypeError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space after a semicolon. + /// + internal static string UseConsistentWhitespaceErrorSeparatorSemi { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorSemi", resourceCulture); } - - /// - /// Looks up a localized string similar to The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. . - /// - internal static string UsePSCredentialTypeErrorSB { - get { - return ResourceManager.GetString("UsePSCredentialTypeErrorSB", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseSupportsShouldProcess + /// + internal static string UseSupportsShouldProcessName { + get { + return ResourceManager.GetString("UseSupportsShouldProcessName", resourceCulture); } - - /// - /// Looks up a localized string similar to UsePSCredentialType. - /// - internal static string UsePSCredentialTypeName { - get { - return ResourceManager.GetString("UsePSCredentialTypeName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use SupportsShouldProcess + /// + internal static string UseSupportsShouldProcessCommonName { + get { + return ResourceManager.GetString("UseSupportsShouldProcessCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use ShouldProcess For State Changing Functions. - /// - internal static string UseShouldProcessForStateChangingFunctionsCommonName { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. + /// + internal static string UseSupportsShouldProcessDescription { + get { + return ResourceManager.GetString("UseSupportsShouldProcessDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'.. - /// - internal static string UseShouldProcessForStateChangingFunctionsDescrption { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsDescrption", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. + /// + internal static string UseSupportsShouldProcessError { + get { + return ResourceManager.GetString("UseSupportsShouldProcessError", resourceCulture); } - - /// - /// Looks up a localized string similar to Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.. - /// - internal static string UseShouldProcessForStateChangingFunctionsError { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AlignAssignmentStatement + /// + internal static string AlignAssignmentStatementName { + get { + return ResourceManager.GetString("AlignAssignmentStatementName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseShouldProcessForStateChangingFunctions. - /// - internal static string UseShouldProcessForStateChangingFunctionsName { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Align assignment statement + /// + internal static string AlignAssignmentStatementCommonName { + get { + return ResourceManager.GetString("AlignAssignmentStatementCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet Singular Noun. - /// - internal static string UseSingularNounsCommonName { - get { - return ResourceManager.GetString("UseSingularNounsCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Line up assignment statements such that the assignment operator are aligned. + /// + internal static string AlignAssignmentStatementDescription { + get { + return ResourceManager.GetString("AlignAssignmentStatementDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Cmdlet should use singular instead of plural nouns.. - /// - internal static string UseSingularNounsDescription { - get { - return ResourceManager.GetString("UseSingularNounsDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Assignment statements are not aligned + /// + internal static string AlignAssignmentStatementError { + get { + return ResourceManager.GetString("AlignAssignmentStatementError", resourceCulture); } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses a plural noun. A singular noun should be used instead.. - /// - internal static string UseSingularNounsError { - get { - return ResourceManager.GetString("UseSingularNounsError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '=' is not an assignment operator. Did you mean the equality operator '-eq'? + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseSingularNouns. - /// - internal static string UseSingularNounsName { - get { - return ResourceManager.GetString("UseSingularNounsName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PossibleIncorrectUsageOfAssignmentOperator + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorName", resourceCulture); } - - /// - /// Looks up a localized string similar to Missing '{0}' function. DSC Class must implement Get, Set and Test functions.. - /// - internal static string UseStandardDSCFunctionsInClassError { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInClassError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use a different variable name + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariable { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariable", resourceCulture); } - - /// - /// Looks up a localized string similar to Use Standard Get/Set/Test TargetResource functions in DSC Resource . - /// - internal static string UseStandardDSCFunctionsInResourceCommonName { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Changing automtic variables might have undesired side effects + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableCommonName { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions.. - /// - internal static string UseStandardDSCFunctionsInResourceDescription { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to This automatic variables is built into PowerShell and readonly. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableDescription { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions.. - /// - internal static string UseStandardDSCFunctionsInResourceError { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableError { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableError", resourceCulture); } - - /// - /// Looks up a localized string similar to StandardDSCFunctionsInResource. - /// - internal static string UseStandardDSCFunctionsInResourceName { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to AvoidAssignmentToAutomaticVariable + /// + internal static string AvoidAssignmentToAutomaticVariableName { + get { + return ResourceManager.GetString("AvoidAssignmentToAutomaticVariableName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use SupportsShouldProcess. - /// - internal static string UseSupportsShouldProcessCommonName { - get { - return ResourceManager.GetString("UseSupportsShouldProcessCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error", resourceCulture); } - - /// - /// Looks up a localized string similar to Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess.. - /// - internal static string UseSupportsShouldProcessDescription { - get { - return ResourceManager.GetString("UseSupportsShouldProcessDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. + /// + internal static string AvoidUsingCmdletAliasesMissingGetPrefixError { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesMissingGetPrefixError", resourceCulture); } - - /// - /// Looks up a localized string similar to Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute.. - /// - internal static string UseSupportsShouldProcessError { - get { - return ResourceManager.GetString("UseSupportsShouldProcessError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorDescription { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to UseSupportsShouldProcess. - /// - internal static string UseSupportsShouldProcessName { - get { - return ResourceManager.GetString("UseSupportsShouldProcessName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorError { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorError", resourceCulture); } - - /// - /// Looks up a localized string similar to Use the *ToExport module manifest fields.. - /// - internal static string UseToExportFieldsInManifestCommonName { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to Replace {0} with {1}. - /// - internal static string UseToExportFieldsInManifestCorrectionDescription { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestCorrectionDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorDescription { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module.. - /// - internal static string UseToExportFieldsInManifestDescription { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorError { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorError", resourceCulture); } - - /// - /// Looks up a localized string similar to Do not use wildcard or $null in this field. Explicitly specify a list for {0}. . - /// - internal static string UseToExportFieldsInManifestError { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to PossibleIncorrectUsageOfRedirectionOperator + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorName", resourceCulture); } - - /// - /// Looks up a localized string similar to UseToExportFieldsInManifest. - /// - internal static string UseToExportFieldsInManifestName { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use $null on the left hand side for safe comparison with $null. + /// + internal static string PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to Use Type At Variable Assignment. - /// - internal static string UseTypeAtVariableAssignmentCommonName { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space after open brace. + /// + internal static string UseConsistentWhitespaceErrorAfterOpeningBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorAfterOpeningBrace", resourceCulture); } - - /// - /// Looks up a localized string similar to Types should be specified at variable assignments to maintain readability and maintainability of script.. - /// - internal static string UseTypeAtVariableAssignmentDescription { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space before closing brace. + /// + internal static string UseConsistentWhitespaceErrorBeforeClosingInnerBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeClosingInnerBrace", resourceCulture); } - - /// - /// Looks up a localized string similar to Specify type at the assignment of variable '{0}'. - /// - internal static string UseTypeAtVariableAssignmentError { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space after pipe. + /// + internal static string UseConsistentWhitespaceErrorSpaceAfterPipe { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceAfterPipe", resourceCulture); } - - /// - /// Looks up a localized string similar to UseTypeAtVariableAssignment. - /// - internal static string UseTypeAtVariableAssignmentName { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use space before pipe. + /// + internal static string UseConsistentWhitespaceErrorSpaceBeforePipe { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceBeforePipe", resourceCulture); } - - /// - /// Looks up a localized string similar to Use UTF8 Encoding For Help File. - /// - internal static string UseUTF8EncodingForHelpFileCommonName { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use exact casing of cmdlet/function name. + /// + internal static string UseCorrectCasingCommonName { + get { + return ResourceManager.GetString("UseCorrectCasingCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to PowerShell help file needs to use UTF8 Encoding.. - /// - internal static string UseUTF8EncodingForHelpFileDescription { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to For better readability and consistency, use the exact casing of the cmdlet/function. + /// + internal static string UseCorrectCasingDescription { + get { + return ResourceManager.GetString("UseCorrectCasingDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file.. - /// - internal static string UseUTF8EncodingForHelpFileError { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileError", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Cmdlet/Function does not match its exact casing '{0}'. + /// + internal static string UseCorrectCasingError { + get { + return ResourceManager.GetString("UseCorrectCasingError", resourceCulture); } - - /// - /// Looks up a localized string similar to UseUTF8EncodingForHelpFile. - /// - internal static string UseUTF8EncodingForHelpFileName { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseCorrectCasing + /// + internal static string UseCorrectCasingName { + get { + return ResourceManager.GetString("UseCorrectCasingName", resourceCulture); } - - /// - /// Looks up a localized string similar to Use verbose message in DSC resource. - /// - internal static string UseVerboseMessageInDSCResourceCommonName { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceCommonName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Use process block for pipeline commands + /// + internal static string UseProcessBlockForPipelineCommandsCommonName { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsCommonName", resourceCulture); } - - /// - /// Looks up a localized string similar to It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed.. - /// - internal static string UseVerboseMessageInDSCResourceDescription { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceDescription", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + /// + internal static string UseProcessBlockForPipelineCommandsDescription { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsDescription", resourceCulture); } - - /// - /// Looks up a localized string similar to There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application.. - /// - internal static string UseVerboseMessageInDSCResourceErrorFunction { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceErrorFunction", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to Commands that support pipeline input should return output in a process block. + /// + internal static string UseProcessBlockForPipelineCommandsError { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsError", resourceCulture); } - - /// - /// Looks up a localized string similar to UseVerboseMessageInDSCResource. - /// - internal static string UseVerboseMessageInDSCResourceName { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceName", resourceCulture); - } + } + + /// + /// Looks up a localized string similar to UseProcessBlockForPipelineCommands + /// + internal static string UseProcessBlockForPipelineCommandsName { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsName", resourceCulture); } } + +} } From 794366b634a8942567bd60e093bae0913a1ab694 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 16 Nov 2019 18:12:50 +0000 Subject: [PATCH 03/23] Update strongly typed resources via Visual Studio --- Rules/Strings.Designer.cs | 5304 +++++++++++++++++++------------------ 1 file changed, 2653 insertions(+), 2651 deletions(-) diff --git a/Rules/Strings.Designer.cs b/Rules/Strings.Designer.cs index f362e677b..8587b4cde 100644 --- a/Rules/Strings.Designer.cs +++ b/Rules/Strings.Designer.cs @@ -1,2986 +1,2988 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // -// This code was generated by a New-StronglyTypedCsFileForResx function. -// To add or remove a member, edit your .ResX file then rerun Start-ResGen. +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules { -using System; -using System.Reflection; - -/// -/// A strongly-typed resource class, for looking up localized strings, etc. -/// -[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] -[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] -[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - -internal class Strings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Strings() { - } - +namespace Microsoft.Windows.PowerShell.ScriptAnalyzer { + using System; + + /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.Strings", typeof(Strings).GetTypeInfo().Assembly); - resourceMan = temp; + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; } - return resourceMan; } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } } - set { - resourceCulture = value; + + /// + /// Looks up a localized string similar to Align assignment statement. + /// + internal static string AlignAssignmentStatementCommonName { + get { + return ResourceManager.GetString("AlignAssignmentStatementCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. - /// - internal static string AvoidUsingCmdletAliasesDescription { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Line up assignment statements such that the assignment operator are aligned.. + /// + internal static string AlignAssignmentStatementDescription { + get { + return ResourceManager.GetString("AlignAssignmentStatementDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. - /// - internal static string AvoidUsingCmdletAliasesCommonName { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Assignment statements are not aligned. + /// + internal static string AlignAssignmentStatementError { + get { + return ResourceManager.GetString("AlignAssignmentStatementError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. - /// - internal static string AvoidUsingEmptyCatchBlockDescription { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockDescription", resourceCulture); + + /// + /// Looks up a localized string similar to AlignAssignmentStatement. + /// + internal static string AlignAssignmentStatementName { + get { + return ResourceManager.GetString("AlignAssignmentStatementName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Empty Catch Block - /// - internal static string AvoidUsingEmptyCatchBlockCommonName { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidAssignmentToAutomaticVariable. + /// + internal static string AvoidAssignmentToAutomaticVariableName { + get { + return ResourceManager.GetString("AvoidAssignmentToAutomaticVariableName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. - /// - internal static string AvoidUsingInvokeExpressionRuleDescription { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use a different variable name. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariable { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariable", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Invoke-Expression - /// - internal static string AvoidUsingInvokeExpressionRuleCommonName { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Changing automtic variables might have undesired side effects. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableCommonName { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. - /// - internal static string AvoidUsingPositionalParametersDescription { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersDescription", resourceCulture); + + /// + /// Looks up a localized string similar to This automatic variables is built into PowerShell and readonly.. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableDescription { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Positional Parameters - /// - internal static string AvoidUsingPositionalParametersCommonName { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name.. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableError { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. - /// - internal static string ProvideCommentHelpDescription { - get { - return ResourceManager.GetString("ProvideCommentHelpDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name.. + /// + internal static string AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error { + get { + return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' does not have a help comment. - /// - internal static string ProvideCommentHelpError { - get { - return ResourceManager.GetString("ProvideCommentHelpError", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using ComputerName Hardcoded. + /// + internal static string AvoidComputerNameHardcodedCommonName { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Basic Comment Help - /// - internal static string ProvideCommentHelpCommonName { - get { - return ResourceManager.GetString("ProvideCommentHelpCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.. + /// + internal static string AvoidComputerNameHardcodedDescription { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. - /// - internal static string UseApprovedVerbsDescription { - get { - return ResourceManager.GetString("UseApprovedVerbsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared.. + /// + internal static string AvoidComputerNameHardcodedError { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses an unapproved verb. - /// - internal static string UseApprovedVerbsError { - get { - return ResourceManager.GetString("UseApprovedVerbsError", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingComputerNameHardcoded. + /// + internal static string AvoidComputerNameHardcodedName { + get { + return ResourceManager.GetString("AvoidComputerNameHardcodedName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet Verbs - /// - internal static string UseApprovedVerbsCommonName { - get { - return ResourceManager.GetString("UseApprovedVerbsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Default Value For Mandatory Parameter. + /// + internal static string AvoidDefaultValueForMandatoryParameterCommonName { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Ensure declared variables are used elsewhere in the script and not just during assignment. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsDescription { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block.. + /// + internal static string AvoidDefaultValueForMandatoryParameterDescription { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The variable '{0}' is assigned but never used. - /// - internal static string UseDeclaredVarsMoreThanAssignmentsError { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsError", resourceCulture); + + /// + /// Looks up a localized string similar to Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized.. + /// + internal static string AvoidDefaultValueForMandatoryParameterError { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Extra Variables - /// - internal static string UseDeclaredVarsMoreThanAssignmentsCommonName { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidDefaultValueForMandatoryParameter. + /// + internal static string AvoidDefaultValueForMandatoryParameterName { + get { + return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. - /// - internal static string AvoidGlobalVarsDescription { - get { - return ResourceManager.GetString("AvoidGlobalVarsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Switch Parameters Should Not Default To True. + /// + internal static string AvoidDefaultValueSwitchParameterCommonName { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Found global variable '{0}'. - /// - internal static string AvoidGlobalVarsError { - get { - return ResourceManager.GetString("AvoidGlobalVarsError", resourceCulture); + + /// + /// Looks up a localized string similar to Switch parameter should not default to true.. + /// + internal static string AvoidDefaultValueSwitchParameterDescription { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to No Global Variables - /// - internal static string AvoidGlobalVarsCommonName { - get { - return ResourceManager.GetString("AvoidGlobalVarsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' has a switch parameter default to true.. + /// + internal static string AvoidDefaultValueSwitchParameterError { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. - /// - internal static string PossibleIncorrectComparisonWithNullDescription { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Script definition has a switch parameter default to true.. + /// + internal static string AvoidDefaultValueSwitchParameterErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterErrorScriptDefinition", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to $null should be on the left side of equality comparisons. - /// - internal static string PossibleIncorrectComparisonWithNullError { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullError", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidDefaultValueSwitchParameter. + /// + internal static string AvoidDefaultValueSwitchParameterName { + get { + return ResourceManager.GetString("AvoidDefaultValueSwitchParameterName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Null Comparison - /// - internal static string PossibleIncorrectComparisonWithNullCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Empty catch block is used. Please use Write-Error or throw statements in catch blocks.. + /// + internal static string AvoidEmptyCatchBlockError { + get { + return ResourceManager.GetString("AvoidEmptyCatchBlockError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that cmdlets and parameters have more than one character. - /// - internal static string OneCharDescription { - get { - return ResourceManager.GetString("OneCharDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid global aliases.. + /// + internal static string AvoidGlobalAliasesCommonName { + get { + return ResourceManager.GetString("AvoidGlobalAliasesCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet name '{0}' only has one character. - /// - internal static string OneCharErrorCmdlet { - get { - return ResourceManager.GetString("OneCharErrorCmdlet", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts.. + /// + internal static string AvoidGlobalAliasesDescription { + get { + return ResourceManager.GetString("AvoidGlobalAliasesDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' has a parameter '{1}' that only has one character. - /// - internal static string OneCharErrorParameter { - get { - return ResourceManager.GetString("OneCharErrorParameter", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid creating aliases with a Global scope.. + /// + internal static string AvoidGlobalAliasesError { + get { + return ResourceManager.GetString("AvoidGlobalAliasesError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to A script block has a parameter '{0}' that only has one character. - /// - internal static string OneCharErrorParameterSB { - get { - return ResourceManager.GetString("OneCharErrorParameterSB", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidGlobalAliases. + /// + internal static string AvoidGlobalAliasesName { + get { + return ResourceManager.GetString("AvoidGlobalAliasesName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to One Char - /// - internal static string OneCharCommonName { - get { - return ResourceManager.GetString("OneCharCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid global functiosn and aliases. + /// + internal static string AvoidGlobalFunctionsCommonName { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. - /// - internal static string UsePSCredentialTypeDescription { - get { - return ResourceManager.GetString("UsePSCredentialTypeDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems.. + /// + internal static string AvoidGlobalFunctionsDescription { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - /// - internal static string UsePSCredentialTypeError { - get { - return ResourceManager.GetString("UsePSCredentialTypeError", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid creating functions with a Global scope.. + /// + internal static string AvoidGlobalFunctionsError { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - /// - internal static string UsePSCredentialTypeErrorSB { - get { - return ResourceManager.GetString("UsePSCredentialTypeErrorSB", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidGlobalFunctions. + /// + internal static string AvoidGlobalFunctionsName { + get { + return ResourceManager.GetString("AvoidGlobalFunctionsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use PSCredential type. - /// - internal static string UsePSCredentialTypeCommonName { - get { - return ResourceManager.GetString("UsePSCredentialTypeCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to No Global Variables. + /// + internal static string AvoidGlobalVarsCommonName { + get { + return ResourceManager.GetString("AvoidGlobalVarsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. - /// - internal static string ReservedCmdletCharDescription { - get { - return ResourceManager.GetString("ReservedCmdletCharDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems.. + /// + internal static string AvoidGlobalVarsDescription { + get { + return ResourceManager.GetString("AvoidGlobalVarsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses a reserved char in its name. - /// - internal static string ReservedCmdletCharError { - get { - return ResourceManager.GetString("ReservedCmdletCharError", resourceCulture); + + /// + /// Looks up a localized string similar to Found global variable '{0}'.. + /// + internal static string AvoidGlobalVarsError { + get { + return ResourceManager.GetString("AvoidGlobalVarsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Reserved Cmdlet Chars - /// - internal static string ReservedCmdletCharCommonName { - get { - return ResourceManager.GetString("ReservedCmdletCharCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidGlobalVars. + /// + internal static string AvoidGlobalVarsName { + get { + return ResourceManager.GetString("AvoidGlobalVarsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' - /// - internal static string ReservedParamsCmdletPrefix { - get { - return ResourceManager.GetString("ReservedParamsCmdletPrefix", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Invoking Empty Members. + /// + internal static string AvoidInvokingEmptyMembersCommonName { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. - /// - internal static string ReservedParamsDescription { - get { - return ResourceManager.GetString("ReservedParamsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant.. + /// + internal static string AvoidInvokingEmptyMembersDescription { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' defines the reserved common parameter '{1}'. - /// - internal static string ReservedParamsError { - get { - return ResourceManager.GetString("ReservedParamsError", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script.. + /// + internal static string AvoidInvokingEmptyMembersError { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Reserved Parameters - /// - internal static string ReservedParamsCommonName { - get { - return ResourceManager.GetString("ReservedParamsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidInvokingEmptyMembers. + /// + internal static string AvoidInvokingEmptyMembersName { + get { + return ResourceManager.GetString("AvoidInvokingEmptyMembersName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The script - /// - internal static string ReservedParamsScriptPrefix { - get { - return ResourceManager.GetString("ReservedParamsScriptPrefix", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid long lines. + /// + internal static string AvoidLongLinesCommonName { + get { + return ResourceManager.GetString("AvoidLongLinesCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ - /// - internal static string ReserverCmdletChars { - get { - return ResourceManager.GetString("ReserverCmdletChars", resourceCulture); + + /// + /// Looks up a localized string similar to Line lengths should be less than the configured maximum. + /// + internal static string AvoidLongLinesDescription { + get { + return ResourceManager.GetString("AvoidLongLinesDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. - /// - internal static string ShouldProcessDescription { - get { - return ResourceManager.GetString("ShouldProcessDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Line exceeds the configured maximum length of {0} characters. + /// + internal static string AvoidLongLinesError { + get { + return ResourceManager.GetString("AvoidLongLinesError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - /// - internal static string ShouldProcessErrorHasAttribute { - get { - return ResourceManager.GetString("ShouldProcessErrorHasAttribute", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidLongLines. + /// + internal static string AvoidLongLinesName { + get { + return ResourceManager.GetString("AvoidLongLinesName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - /// - internal static string ShouldProcessErrorHasAttributeSB { - get { - return ResourceManager.GetString("ShouldProcessErrorHasAttributeSB", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid using null or empty HelpMessage parameter attribute.. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeCommonName { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - /// - internal static string ShouldProcessErrorHasCmdlet { - get { - return ResourceManager.GetString("ShouldProcessErrorHasCmdlet", resourceCulture); + + /// + /// Looks up a localized string similar to Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function.. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeDescription { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - /// - internal static string ShouldProcessErrorHasCmdletSB { - get { - return ResourceManager.GetString("ShouldProcessErrorHasCmdletSB", resourceCulture); + + /// + /// Looks up a localized string similar to HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string.. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeError { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Should Process - /// - internal static string ShouldProcessCommonName { - get { - return ResourceManager.GetString("ShouldProcessCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidNullOrEmptyHelpMessageAttribute. + /// + internal static string AvoidNullOrEmptyHelpMessageAttributeName { + get { + return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PS - /// - internal static string SourceName { - get { - return ResourceManager.GetString("SourceName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. - /// - internal static string UseVerboseMessageInDSCResourceDescription { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. - /// - internal static string UseVerboseMessageInDSCResourceErrorFunction { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceErrorFunction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use verbose message in DSC resource - /// - internal static string UseVerboseMessageInDSCResourceCommonName { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceCommonName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Some fields of the module manifest (such as ModuleVersion) are required. - /// - internal static string MissingModuleManifestFieldDescription { - get { - return ResourceManager.GetString("MissingModuleManifestFieldDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using ShouldContinue Without Boolean Force Parameter. + /// + internal static string AvoidShouldContinueWithoutForceCommonName { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Module Manifest Fields - /// - internal static string MissingModuleManifestFieldCommonName { - get { - return ResourceManager.GetString("MissingModuleManifestFieldCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it.. + /// + internal static string AvoidShouldContinueWithoutForceDescription { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to If a script file is in a PowerShell module folder, then that folder must be loadable. - /// - internal static string AvoidUnloadableModuleDescription { - get { - return ResourceManager.GetString("AvoidUnloadableModuleDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt. + /// + internal static string AvoidShouldContinueWithoutForceError { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cannot load the module '{0}' that file '{1}' is in. - /// - internal static string AvoidUnloadableModuleError { - get { - return ResourceManager.GetString("AvoidUnloadableModuleError", resourceCulture); + + /// + /// Looks up a localized string similar to Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt. + /// + internal static string AvoidShouldContinueWithoutForceErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceErrorScriptDefinition", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Module Must Be Loadable - /// - internal static string AvoidUnloadableModuleCommonName { - get { - return ResourceManager.GetString("AvoidUnloadableModuleCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidShouldContinueWithoutForce. + /// + internal static string AvoidShouldContinueWithoutForceName { + get { + return ResourceManager.GetString("AvoidShouldContinueWithoutForceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Error Message is Null. - /// - internal static string NullErrorMessage { - get { - return ResourceManager.GetString("NullErrorMessage", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid trailing whitespace. + /// + internal static string AvoidTrailingWhitespaceCommonName { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Password parameters that take in plaintext will expose passwords and compromise the security of your system. - /// - internal static string AvoidUsingPlainTextForPasswordDescription { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Each line should have no trailing whitespace.. + /// + internal static string AvoidTrailingWhitespaceDescription { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. - /// - internal static string AvoidUsingPlainTextForPasswordError { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordError", resourceCulture); + + /// + /// Looks up a localized string similar to Line has trailing whitespace. + /// + internal static string AvoidTrailingWhitespaceError { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Plain Text For Password Parameter - /// - internal static string AvoidUsingPlainTextForPasswordCommonName { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidTrailingWhitespace. + /// + internal static string AvoidTrailingWhitespaceName { + get { + return ResourceManager.GetString("AvoidTrailingWhitespaceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Using ConvertTo-SecureString with plain text will expose secure information. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextDescription { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Module Must Be Loadable. + /// + internal static string AvoidUnloadableModuleCommonName { + get { + return ResourceManager.GetString("AvoidUnloadableModuleCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextError { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextError", resourceCulture); + + /// + /// Looks up a localized string similar to If a script file is in a PowerShell module folder, then that folder must be loadable.. + /// + internal static string AvoidUnloadableModuleDescription { + get { + return ResourceManager.GetString("AvoidUnloadableModuleDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using SecureString With Plain Text - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextCommonName { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Cannot load the module '{0}' that file '{1}' is in.. + /// + internal static string AvoidUnloadableModuleError { + get { + return ResourceManager.GetString("AvoidUnloadableModuleError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Switch parameter should not default to true. - /// - internal static string AvoidDefaultValueSwitchParameterDescription { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterDescription", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUnloadableModule. + /// + internal static string AvoidUnloadableModuleName { + get { + return ResourceManager.GetString("AvoidUnloadableModuleName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' has a switch parameter default to true. - /// - internal static string AvoidDefaultValueSwitchParameterError { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterError", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Username and Password Parameters. + /// + internal static string AvoidUsernameAndPasswordParamsCommonName { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Switch Parameters Should Not Default To True - /// - internal static string AvoidDefaultValueSwitchParameterCommonName { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString.. + /// + internal static string AvoidUsernameAndPasswordParamsDescription { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. - /// - internal static string AvoidShouldContinueWithoutForceDescription { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute.. + /// + internal static string AvoidUsernameAndPasswordParamsError { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - /// - internal static string AvoidShouldContinueWithoutForceError { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceError", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingUsernameAndPasswordParams. + /// + internal static string AvoidUsernameAndPasswordParamsName { + get { + return ResourceManager.GetString("AvoidUsernameAndPasswordParamsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using ShouldContinue Without Boolean Force Parameter - /// - internal static string AvoidShouldContinueWithoutForceCommonName { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Clear-Host. + /// + internal static string AvoidUsingClearHostCommonName { + get { + return ResourceManager.GetString("AvoidUsingClearHostCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. - /// - internal static string AvoidUsingClearHostDescription { - get { - return ResourceManager.GetString("AvoidUsingClearHostDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all.. + /// + internal static string AvoidUsingClearHostDescription { + get { + return ResourceManager.GetString("AvoidUsingClearHostDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. - /// - internal static string AvoidUsingClearHostError { - get { - return ResourceManager.GetString("AvoidUsingClearHostError", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all.. + /// + internal static string AvoidUsingClearHostError { + get { + return ResourceManager.GetString("AvoidUsingClearHostError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Clear-Host - /// - internal static string AvoidUsingClearHostCommonName { - get { - return ResourceManager.GetString("AvoidUsingClearHostCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingClearHost. + /// + internal static string AvoidUsingClearHostName { + get { + return ResourceManager.GetString("AvoidUsingClearHostName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - /// - internal static string AvoidUsingConsoleWriteError { - get { - return ResourceManager.GetString("AvoidUsingConsoleWriteError", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix.. + /// + internal static string AvoidUsingCmdletAliasesCommonName { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - /// - internal static string AvoidUsingWriteHostDescription { - get { - return ResourceManager.GetString("AvoidUsingWriteHostDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Replace {0} with {1}. + /// + internal static string AvoidUsingCmdletAliasesCorrectionDescription { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesCorrectionDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - /// - internal static string AvoidUsingWriteHostError { - get { - return ResourceManager.GetString("AvoidUsingWriteHostError", resourceCulture); + + /// + /// Looks up a localized string similar to An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availa [rest of string was truncated]";. + /// + internal static string AvoidUsingCmdletAliasesDescription { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Write-Host - /// - internal static string AvoidUsingWriteHostCommonName { - get { - return ResourceManager.GetString("AvoidUsingWriteHostCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.. + /// + internal static string AvoidUsingCmdletAliasesError { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet should use singular instead of plural nouns. - /// - internal static string UseSingularNounsDescription { - get { - return ResourceManager.GetString("UseSingularNounsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name.. + /// + internal static string AvoidUsingCmdletAliasesMissingGetPrefixError { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesMissingGetPrefixError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. - /// - internal static string UseSingularNounsError { - get { - return ResourceManager.GetString("UseSingularNounsError", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingCmdletAliases. + /// + internal static string AvoidUsingCmdletAliasesName { + get { + return ResourceManager.GetString("AvoidUsingCmdletAliasesName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet Singular Noun - /// - internal static string UseSingularNounsCommonName { - get { - return ResourceManager.GetString("UseSingularNounsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead.. + /// + internal static string AvoidUsingConsoleWriteError { + get { + return ResourceManager.GetString("AvoidUsingConsoleWriteError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingCmdletAliases - /// - internal static string AvoidUsingCmdletAliasesName { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using SecureString With Plain Text. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextCommonName { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidDefaultValueSwitchParameter - /// - internal static string AvoidDefaultValueSwitchParameterName { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterName", resourceCulture); + + /// + /// Looks up a localized string similar to Using ConvertTo-SecureString with plain text will expose secure information.. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextDescription { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidGlobalVars - /// - internal static string AvoidGlobalVarsName { - get { - return ResourceManager.GetString("AvoidGlobalVarsName", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead.. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextError { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidShouldContinueWithoutForce - /// - internal static string AvoidShouldContinueWithoutForceName { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceName", resourceCulture); + + /// + /// Looks up a localized string similar to Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead.. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUnloadableModule - /// - internal static string AvoidUnloadableModuleName { - get { - return ResourceManager.GetString("AvoidUnloadableModuleName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingConvertToSecureStringWithPlainText. + /// + internal static string AvoidUsingConvertToSecureStringWithPlainTextName { + get { + return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingClearHost - /// - internal static string AvoidUsingClearHostName { - get { - return ResourceManager.GetString("AvoidUsingClearHostName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Deprecated Manifest Fields. + /// + internal static string AvoidUsingDeprecatedManifestFieldsCommonName { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingConvertToSecureStringWithPlainText - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextName { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextName", resourceCulture); + + /// + /// Looks up a localized string similar to "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency.. + /// + internal static string AvoidUsingDeprecatedManifestFieldsDescription { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingEmptyCatchBlock - /// - internal static string AvoidUsingEmptyCatchBlockName { - get { - return ResourceManager.GetString("AvoidUsingEmptyCatchBlockName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingDeprecatedManifestFields. + /// + internal static string AvoidUsingDeprecatedManifestFieldsName { + get { + return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingInvokeExpression - /// - internal static string AvoidUsingInvokeExpressionRuleName { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Empty Catch Block. + /// + internal static string AvoidUsingEmptyCatchBlockCommonName { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingPlainTextForPassword - /// - internal static string AvoidUsingPlainTextForPasswordName { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordName", resourceCulture); + + /// + /// Looks up a localized string similar to Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks.. + /// + internal static string AvoidUsingEmptyCatchBlockDescription { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingPositionalParameters - /// - internal static string AvoidUsingPositionalParametersName { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingEmptyCatchBlock. + /// + internal static string AvoidUsingEmptyCatchBlockName { + get { + return ResourceManager.GetString("AvoidUsingEmptyCatchBlockName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingWriteHost - /// - internal static string AvoidUsingWriteHostName { - get { - return ResourceManager.GetString("AvoidUsingWriteHostName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Internal URLs. + /// + internal static string AvoidUsingInternalURLsCommonName { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to OneChar - /// - internal static string OneCharName { - get { - return ResourceManager.GetString("OneCharName", resourceCulture); + + /// + /// Looks up a localized string similar to Using Internal URLs in the scripts may cause security problems.. + /// + internal static string AvoidUsingInternalURLsDescription { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PossibleIncorrectComparisonWithNull - /// - internal static string PossibleIncorrectComparisonWithNullName { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullName", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure.. + /// + internal static string AvoidUsingInternalURLsError { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ProvideCommentHelp - /// - internal static string ProvideCommentHelpName { - get { - return ResourceManager.GetString("ProvideCommentHelpName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingInternalURLs. + /// + internal static string AvoidUsingInternalURLsName { + get { + return ResourceManager.GetString("AvoidUsingInternalURLsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ReservedCmdletChar - /// - internal static string ReservedCmdletCharName { - get { - return ResourceManager.GetString("ReservedCmdletCharName", resourceCulture); + + /// + /// Looks up a localized string similar to Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead.. + /// + internal static string AvoidUsingInvokeExpressionError { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ReservedParams - /// - internal static string ReservedParamsName { - get { - return ResourceManager.GetString("ReservedParamsName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Invoke-Expression. + /// + internal static string AvoidUsingInvokeExpressionRuleCommonName { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ShouldProcess - /// - internal static string ShouldProcessName { - get { - return ResourceManager.GetString("ShouldProcessName", resourceCulture); + + /// + /// Looks up a localized string similar to The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Exp [rest of string was truncated]";. + /// + internal static string AvoidUsingInvokeExpressionRuleDescription { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseApprovedVerbs - /// - internal static string UseApprovedVerbsName { - get { - return ResourceManager.GetString("UseApprovedVerbsName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingInvokeExpression. + /// + internal static string AvoidUsingInvokeExpressionRuleName { + get { + return ResourceManager.GetString("AvoidUsingInvokeExpressionRuleName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseDeclaredVarsMoreThanAssignments - /// - internal static string UseDeclaredVarsMoreThanAssignmentsName { - get { - return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Plain Text For Password Parameter. + /// + internal static string AvoidUsingPlainTextForPasswordCommonName { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UsePSCredentialType - /// - internal static string UsePSCredentialTypeName { - get { - return ResourceManager.GetString("UsePSCredentialTypeName", resourceCulture); + + /// + /// Looks up a localized string similar to Set {0} type to SecureString. + /// + internal static string AvoidUsingPlainTextForPasswordCorrectionDescription { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCorrectionDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseSingularNouns - /// - internal static string UseSingularNounsName { - get { - return ResourceManager.GetString("UseSingularNounsName", resourceCulture); + + /// + /// Looks up a localized string similar to Password parameters that take in plaintext will expose passwords and compromise the security of your system.. + /// + internal static string AvoidUsingPlainTextForPasswordDescription { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to MissingModuleManifestField - /// - internal static string MissingModuleManifestFieldName { - get { - return ResourceManager.GetString("MissingModuleManifestFieldName", resourceCulture); + + /// + /// Looks up a localized string similar to Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information.. + /// + internal static string AvoidUsingPlainTextForPasswordError { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseVerboseMessageInDSCResource - /// - internal static string UseVerboseMessageInDSCResourceName { - get { - return ResourceManager.GetString("UseVerboseMessageInDSCResourceName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingPlainTextForPassword. + /// + internal static string AvoidUsingPlainTextForPasswordName { + get { + return ResourceManager.GetString("AvoidUsingPlainTextForPasswordName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Command Not Found - /// - internal static string CommandNotFoundCommonName { - get { - return ResourceManager.GetString("CommandNotFoundCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Positional Parameters. + /// + internal static string AvoidUsingPositionalParametersCommonName { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Commands that are undefined or do not exist should not be used. - /// - internal static string CommandNotFoundDescription { - get { - return ResourceManager.GetString("CommandNotFoundDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command.. + /// + internal static string AvoidUsingPositionalParametersDescription { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Command '{0}' Is Not Found - /// - internal static string CommandNotFoundError { - get { - return ResourceManager.GetString("CommandNotFoundError", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command.. + /// + internal static string AvoidUsingPositionalParametersError { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to CommandNotFound - /// - internal static string CommandNotFoundName { - get { - return ResourceManager.GetString("CommandNotFoundName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingPositionalParameters. + /// + internal static string AvoidUsingPositionalParametersName { + get { + return ResourceManager.GetString("AvoidUsingPositionalParametersName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Type Not Found - /// - internal static string TypeNotFoundCommonName { - get { - return ResourceManager.GetString("TypeNotFoundCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance. + /// + internal static string AvoidUsingWMICmdletCommonName { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Undefined type should not be used - /// - internal static string TypeNotFoundDescription { - get { - return ResourceManager.GetString("TypeNotFoundDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets.. + /// + internal static string AvoidUsingWMICmdletDescription { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Type '{0}' is not found. Please check that it is defined. - /// - internal static string TypeNotFoundError { - get { - return ResourceManager.GetString("TypeNotFoundError", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.. + /// + internal static string AvoidUsingWMICmdletError { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to TypeNotFound - /// - internal static string TypeNotFoundName { - get { - return ResourceManager.GetString("TypeNotFoundName", resourceCulture); + + /// + /// Looks up a localized string similar to Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems.. + /// + internal static string AvoidUsingWMICmdletErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletErrorScriptDefinition", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use Cmdlet Correctly - /// - internal static string UseCmdletCorrectlyCommonName { - get { - return ResourceManager.GetString("UseCmdletCorrectlyCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingWMICmdlet. + /// + internal static string AvoidUsingWMICmdletName { + get { + return ResourceManager.GetString("AvoidUsingWMICmdletName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet should be called with the mandatory parameters. - /// - internal static string UseCmdletCorrectlyDescription { - get { - return ResourceManager.GetString("UseCmdletCorrectlyDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid Using Write-Host. + /// + internal static string AvoidUsingWriteHostCommonName { + get { + return ResourceManager.GetString("AvoidUsingWriteHostCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. - /// - internal static string UseCmdletCorrectlyError { - get { - return ResourceManager.GetString("UseCmdletCorrectlyError", resourceCulture); + + /// + /// Looks up a localized string similar to Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it.. + /// + internal static string AvoidUsingWriteHostDescription { + get { + return ResourceManager.GetString("AvoidUsingWriteHostDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCmdletCorrectly - /// - internal static string UseCmdletCorrectlyName { - get { - return ResourceManager.GetString("UseCmdletCorrectlyName", resourceCulture); + + /// + /// Looks up a localized string similar to File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.. + /// + internal static string AvoidUsingWriteHostError { + get { + return ResourceManager.GetString("AvoidUsingWriteHostError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use Type At Variable Assignment - /// - internal static string UseTypeAtVariableAssignmentCommonName { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information.. + /// + internal static string AvoidUsingWriteHostErrorScriptDefinition { + get { + return ResourceManager.GetString("AvoidUsingWriteHostErrorScriptDefinition", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Types should be specified at variable assignments to maintain readability and maintainability of script. - /// - internal static string UseTypeAtVariableAssignmentDescription { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentDescription", resourceCulture); + + /// + /// Looks up a localized string similar to AvoidUsingWriteHost. + /// + internal static string AvoidUsingWriteHostName { + get { + return ResourceManager.GetString("AvoidUsingWriteHostName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Specify type at the assignment of variable '{0}' - /// - internal static string UseTypeAtVariableAssignmentError { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentError", resourceCulture); + + /// + /// Looks up a localized string similar to Command Not Found. + /// + internal static string CommandNotFoundCommonName { + get { + return ResourceManager.GetString("CommandNotFoundCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseTypeAtVariableAssignment - /// - internal static string UseTypeAtVariableAssignmentName { - get { - return ResourceManager.GetString("UseTypeAtVariableAssignmentName", resourceCulture); + + /// + /// Looks up a localized string similar to Commands that are undefined or do not exist should not be used.. + /// + internal static string CommandNotFoundDescription { + get { + return ResourceManager.GetString("CommandNotFoundDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Username and Password Parameters - /// - internal static string AvoidUsernameAndPasswordParamsCommonName { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Command '{0}' Is Not Found. + /// + internal static string CommandNotFoundError { + get { + return ResourceManager.GetString("CommandNotFoundError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. - /// - internal static string AvoidUsernameAndPasswordParamsDescription { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to CommandNotFound. + /// + internal static string CommandNotFoundName { + get { + return ResourceManager.GetString("CommandNotFoundName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. - /// - internal static string AvoidUsernameAndPasswordParamsError { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsError", resourceCulture); + + /// + /// Looks up a localized string similar to DscExamplesPresent. + /// + internal static string DscExamplesPresent { + get { + return ResourceManager.GetString("DscExamplesPresent", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingUsernameAndPasswordParams - /// - internal static string AvoidUsernameAndPasswordParamsName { - get { - return ResourceManager.GetString("AvoidUsernameAndPasswordParamsName", resourceCulture); + + /// + /// Looks up a localized string similar to DSC examples are present. + /// + internal static string DscExamplesPresentCommonName { + get { + return ResourceManager.GetString("DscExamplesPresentCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Invoking Empty Members - /// - internal static string AvoidInvokingEmptyMembersCommonName { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title.. + /// + internal static string DscExamplesPresentDescription { + get { + return ResourceManager.GetString("DscExamplesPresentDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. - /// - internal static string AvoidInvokingEmptyMembersDescription { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersDescription", resourceCulture); + + /// + /// Looks up a localized string similar to No examples found for resource '{0}'. + /// + internal static string DscExamplesPresentNoExamplesError { + get { + return ResourceManager.GetString("DscExamplesPresentNoExamplesError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. - /// - internal static string AvoidInvokingEmptyMembersError { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersError", resourceCulture); + + /// + /// Looks up a localized string similar to PSDSC. + /// + internal static string DSCSourceName { + get { + return ResourceManager.GetString("DSCSourceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidInvokingEmptyMembers - /// - internal static string AvoidInvokingEmptyMembersName { - get { - return ResourceManager.GetString("AvoidInvokingEmptyMembersName", resourceCulture); + + /// + /// Looks up a localized string similar to DscTestsPresent. + /// + internal static string DscTestsPresent { + get { + return ResourceManager.GetString("DscTestsPresent", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using ComputerName Hardcoded - /// - internal static string AvoidComputerNameHardcodedCommonName { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Dsc tests are present. + /// + internal static string DscTestsPresentCommonName { + get { + return ResourceManager.GetString("DscTestsPresentCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. - /// - internal static string AvoidComputerNameHardcodedDescription { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name.. + /// + internal static string DscTestsPresentDescription { + get { + return ResourceManager.GetString("DscTestsPresentDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. - /// - internal static string AvoidComputerNameHardcodedError { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedError", resourceCulture); + + /// + /// Looks up a localized string similar to No tests found for resource '{0}'. + /// + internal static string DscTestsPresentNoTestsError { + get { + return ResourceManager.GetString("DscTestsPresentNoTestsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingComputerNameHardcoded - /// - internal static string AvoidComputerNameHardcodedName { - get { - return ResourceManager.GetString("AvoidComputerNameHardcodedName", resourceCulture); + + /// + /// Looks up a localized string similar to Misleading Backtick. + /// + internal static string MisleadingBacktickCommonName { + get { + return ResourceManager.GetString("MisleadingBacktickCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Empty catch block is used. Please use Write-Error or throw statements in catch blocks. - /// - internal static string AvoidEmptyCatchBlockError { - get { - return ResourceManager.GetString("AvoidEmptyCatchBlockError", resourceCulture); + + /// + /// Looks up a localized string similar to Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace.. + /// + internal static string MisleadingBacktickDescription { + get { + return ResourceManager.GetString("MisleadingBacktickDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. - /// - internal static string AvoidUsingCmdletAliasesError { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesError", resourceCulture); + + /// + /// Looks up a localized string similar to This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation?. + /// + internal static string MisleadingBacktickError { + get { + return ResourceManager.GetString("MisleadingBacktickError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. - /// - internal static string AvoidUsingInvokeExpressionError { - get { - return ResourceManager.GetString("AvoidUsingInvokeExpressionError", resourceCulture); + + /// + /// Looks up a localized string similar to MisleadingBacktick. + /// + internal static string MisleadingBacktickName { + get { + return ResourceManager.GetString("MisleadingBacktickName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. - /// - internal static string AvoidUsingPositionalParametersError { - get { - return ResourceManager.GetString("AvoidUsingPositionalParametersError", resourceCulture); + + /// + /// Looks up a localized string similar to Module Manifest Fields. + /// + internal static string MissingModuleManifestFieldCommonName { + get { + return ResourceManager.GetString("MissingModuleManifestFieldCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to {0}{1} - /// - internal static string NameSpaceFormat { - get { - return ResourceManager.GetString("NameSpaceFormat", resourceCulture); + + /// + /// Looks up a localized string similar to Add {0} = {1} to the module manifest. + /// + internal static string MissingModuleManifestFieldCorrectionDescription { + get { + return ResourceManager.GetString("MissingModuleManifestFieldCorrectionDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cannot process null Ast - /// - internal static string NullAstErrorMessage { - get { - return ResourceManager.GetString("NullAstErrorMessage", resourceCulture); + + /// + /// Looks up a localized string similar to Some fields of the module manifest (such as ModuleVersion) are required.. + /// + internal static string MissingModuleManifestFieldDescription { + get { + return ResourceManager.GetString("MissingModuleManifestFieldDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cannot process null CommandInfo - /// - internal static string NullCommandInfoError { - get { - return ResourceManager.GetString("NullCommandInfoError", resourceCulture); + + /// + /// Looks up a localized string similar to MissingModuleManifestField. + /// + internal static string MissingModuleManifestFieldName { + get { + return ResourceManager.GetString("MissingModuleManifestFieldName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PSDSC - /// - internal static string DSCSourceName { - get { - return ResourceManager.GetString("DSCSourceName", resourceCulture); + + /// + /// Looks up a localized string similar to {0}{1}. + /// + internal static string NameSpaceFormat { + get { + return ResourceManager.GetString("NameSpaceFormat", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use Standard Get/Set/Test TargetResource functions in DSC Resource - /// - internal static string UseStandardDSCFunctionsInResourceCommonName { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Not all code path in {0} function in DSC Class {1} returns a value. + /// + internal static string NotAllCodePathReturnsDSCFunctionsError { + get { + return ResourceManager.GetString("NotAllCodePathReturnsDSCFunctionsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. - /// - internal static string UseStandardDSCFunctionsInResourceDescription { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Cannot process null Ast. + /// + internal static string NullAstErrorMessage { + get { + return ResourceManager.GetString("NullAstErrorMessage", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. - /// - internal static string UseStandardDSCFunctionsInResourceError { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceError", resourceCulture); + + /// + /// Looks up a localized string similar to Cannot process null CommandInfo. + /// + internal static string NullCommandInfoError { + get { + return ResourceManager.GetString("NullCommandInfoError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to StandardDSCFunctionsInResource - /// - internal static string UseStandardDSCFunctionsInResourceName { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInResourceName", resourceCulture); + + /// + /// Looks up a localized string similar to Error Message is Null.. + /// + internal static string NullErrorMessage { + get { + return ResourceManager.GetString("NullErrorMessage", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Internal URLs - /// - internal static string AvoidUsingInternalURLsCommonName { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to One Char. + /// + internal static string OneCharCommonName { + get { + return ResourceManager.GetString("OneCharCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Using Internal URLs in the scripts may cause security problems. - /// - internal static string AvoidUsingInternalURLsDescription { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that cmdlets and parameters have more than one character.. + /// + internal static string OneCharDescription { + get { + return ResourceManager.GetString("OneCharDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. - /// - internal static string AvoidUsingInternalURLsError { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsError", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet name '{0}' only has one character.. + /// + internal static string OneCharErrorCmdlet { + get { + return ResourceManager.GetString("OneCharErrorCmdlet", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingInternalURLs - /// - internal static string AvoidUsingInternalURLsName { - get { - return ResourceManager.GetString("AvoidUsingInternalURLsName", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' has a parameter '{1}' that only has one character.. + /// + internal static string OneCharErrorParameter { + get { + return ResourceManager.GetString("OneCharErrorParameter", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to www.sharepoint.com - /// - internal static string SharepointURL { - get { - return ResourceManager.GetString("SharepointURL", resourceCulture); + + /// + /// Looks up a localized string similar to A script block has a parameter '{0}' that only has one character.. + /// + internal static string OneCharErrorParameterSB { + get { + return ResourceManager.GetString("OneCharErrorParameterSB", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use Identical Parameters For DSC Test and Set Functions - /// - internal static string UseIdenticalParametersDSCCommonName { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to OneChar. + /// + internal static string OneCharName { + get { + return ResourceManager.GetString("OneCharName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - /// - internal static string UseIdenticalParametersDSCDescription { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Place close braces. + /// + internal static string PlaceCloseBraceCommonName { + get { + return ResourceManager.GetString("PlaceCloseBraceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - /// - internal static string UseIdenticalParametersDSCError { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCError", resourceCulture); + + /// + /// Looks up a localized string similar to Close brace should be on a new line by itself.. + /// + internal static string PlaceCloseBraceDescription { + get { + return ResourceManager.GetString("PlaceCloseBraceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseIdenticalParametersForDSC - /// - internal static string UseIdenticalParametersDSCName { - get { - return ResourceManager.GetString("UseIdenticalParametersDSCName", resourceCulture); + + /// + /// Looks up a localized string similar to Close brace is not on a new line.. + /// + internal static string PlaceCloseBraceErrorShouldBeOnNewLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldBeOnNewLine", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Missing '{0}' function. DSC Class must implement Get, Set and Test functions. - /// - internal static string UseStandardDSCFunctionsInClassError { - get { - return ResourceManager.GetString("UseStandardDSCFunctionsInClassError", resourceCulture); + + /// + /// Looks up a localized string similar to Close brace before a branch statement is followed by a new line.. + /// + internal static string PlaceCloseBraceErrorShouldCuddleBranchStatement { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldCuddleBranchStatement", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions - /// - internal static string UseIdenticalMandatoryParametersDSCCommonName { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Close brace does not follow a new line.. + /// + internal static string PlaceCloseBraceErrorShouldFollowNewLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldFollowNewLine", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. - /// - internal static string UseIdenticalMandatoryParametersDSCDescription { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Close brace does not follow a non-empty line.. + /// + internal static string PlaceCloseBraceErrorShouldNotFollowEmptyLine { + get { + return ResourceManager.GetString("PlaceCloseBraceErrorShouldNotFollowEmptyLine", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). - /// - internal static string UseIdenticalMandatoryParametersDSCError { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCError", resourceCulture); + + /// + /// Looks up a localized string similar to PlaceCloseBrace. + /// + internal static string PlaceCloseBraceName { + get { + return ResourceManager.GetString("PlaceCloseBraceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseIdenticalMandatoryParametersForDSC - /// - internal static string UseIdenticalMandatoryParametersDSCName { - get { - return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCName", resourceCulture); + + /// + /// Looks up a localized string similar to Place open braces consistently. + /// + internal static string PlaceOpenBraceCommonName { + get { + return ResourceManager.GetString("PlaceOpenBraceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Not all code path in {0} function in DSC Class {1} returns a value - /// - internal static string NotAllCodePathReturnsDSCFunctionsError { - get { - return ResourceManager.GetString("NotAllCodePathReturnsDSCFunctionsError", resourceCulture); + + /// + /// Looks up a localized string similar to Place open braces either on the same line as the preceding expression or on a new line.. + /// + internal static string PlaceOpenBraceDescription { + get { + return ResourceManager.GetString("PlaceOpenBraceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ReturnCorrectTypesForDSCFunctions - /// - internal static string ReturnCorrectTypeDSCFunctionsName { - get { - return ResourceManager.GetString("ReturnCorrectTypeDSCFunctionsName", resourceCulture); + + /// + /// Looks up a localized string similar to There is no new line after open brace.. + /// + internal static string PlaceOpenBraceErrorNoNewLineAfterBrace { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorNoNewLineAfterBrace", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Return Correct Types For DSC Functions - /// - internal static string ReturnCorrectTypesForDSCFunctionsCommonName { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Open brace not on same line as preceding keyword. It should be on the same line.. + /// + internal static string PlaceOpenBraceErrorShouldBeOnSameLine { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorShouldBeOnSameLine", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. - /// - internal static string ReturnCorrectTypesForDSCFunctionsDescription { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Open brace is not on a new line.. + /// + internal static string PlaceOpenBraceErrorShouldNotBeOnSameLine { + get { + return ResourceManager.GetString("PlaceOpenBraceErrorShouldNotBeOnSameLine", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} - /// - internal static string ReturnCorrectTypesForDSCFunctionsNoTypeError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsNoTypeError", resourceCulture); + + /// + /// Looks up a localized string similar to PlaceOpenBrace. + /// + internal static string PlaceOpenBraceName { + get { + return ResourceManager.GetString("PlaceOpenBraceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} instead of type {3} - /// - internal static string ReturnCorrectTypesForDSCFunctionsWrongTypeError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsWrongTypeError", resourceCulture); + + /// + /// Looks up a localized string similar to Null Comparison. + /// + internal static string PossibleIncorrectComparisonWithNullCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Set function in DSC Class {0} should not return anything - /// - internal static string ReturnCorrectTypesForSetFunctionsDSCError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForSetFunctionsDSCError", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case.. + /// + internal static string PossibleIncorrectComparisonWithNullDescription { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to {0} function in DSC Resource should return object of type {1} instead of {2} - /// - internal static string ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError", resourceCulture); + + /// + /// Looks up a localized string similar to $null should be on the left side of equality comparisons.. + /// + internal static string PossibleIncorrectComparisonWithNullError { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Set-TargetResource function in DSC Resource should not output anything to the pipeline. - /// - internal static string ReturnCorrectTypesForSetTargetResourceFunctionsDSCError { - get { - return ResourceManager.GetString("ReturnCorrectTypesForSetTargetResourceFunctionsDSCError", resourceCulture); + + /// + /// Looks up a localized string similar to PossibleIncorrectComparisonWithNull. + /// + internal static string PossibleIncorrectComparisonWithNullName { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use ShouldProcess For State Changing Functions - /// - internal static string UseShouldProcessForStateChangingFunctionsCommonName { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use $null on the left hand side for safe comparison with $null.. + /// + internal static string PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription { + get { + return ResourceManager.GetString("PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. - /// - internal static string UseShouldProcessForStateChangingFunctionsDescrption { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsDescrption", resourceCulture); + + /// + /// Looks up a localized string similar to '=' is not an assignment operator. Did you mean the equality operator '-eq'?. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. - /// - internal static string UseShouldProcessForStateChangingFunctionsError { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsError", resourceCulture); + + /// + /// Looks up a localized string similar to '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements.. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorDescription { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseShouldProcessForStateChangingFunctions - /// - internal static string UseShouldProcessForStateChangingFunctionsName { - get { - return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsName", resourceCulture); + + /// + /// Looks up a localized string similar to Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'.. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorError { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance - /// - internal static string AvoidUsingWMICmdletCommonName { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to PossibleIncorrectUsageOfAssignmentOperator. + /// + internal static string PossibleIncorrectUsageOfAssignmentOperatorName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. - /// - internal static string AvoidUsingWMICmdletDescription { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletDescription", resourceCulture); + + /// + /// Looks up a localized string similar to '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal).. + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorCommonName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - /// - internal static string AvoidUsingWMICmdletError { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletError", resourceCulture); + + /// + /// Looks up a localized string similar to When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell.. + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorDescription { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingWMICmdlet - /// - internal static string AvoidUsingWMICmdletName { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletName", resourceCulture); + + /// + /// Looks up a localized string similar to Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal).. + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorError { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use OutputType Correctly - /// - internal static string UseOutputTypeCorrectlyCommonName { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to PossibleIncorrectUsageOfRedirectionOperator. + /// + internal static string PossibleIncorrectUsageOfRedirectionOperatorName { + get { + return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The return types of a cmdlet should be declared using the OutputType attribute. - /// - internal static string UseOutputTypeCorrectlyDescription { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Basic Comment Help. + /// + internal static string ProvideCommentHelpCommonName { + get { + return ResourceManager.GetString("ProvideCommentHelpCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. - /// - internal static string UseOutputTypeCorrectlyError { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyError", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment.. + /// + internal static string ProvideCommentHelpDescription { + get { + return ResourceManager.GetString("ProvideCommentHelpDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseOutputTypeCorrectly - /// - internal static string UseOutputTypeCorrectlyName { - get { - return ResourceManager.GetString("UseOutputTypeCorrectlyName", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' does not have a help comment.. + /// + internal static string ProvideCommentHelpError { + get { + return ResourceManager.GetString("ProvideCommentHelpError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to DscTestsPresent - /// - internal static string DscTestsPresent { - get { - return ResourceManager.GetString("DscTestsPresent", resourceCulture); + + /// + /// Looks up a localized string similar to ProvideCommentHelp. + /// + internal static string ProvideCommentHelpName { + get { + return ResourceManager.GetString("ProvideCommentHelpName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Dsc tests are present - /// - internal static string DscTestsPresentCommonName { - get { - return ResourceManager.GetString("DscTestsPresentCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Reserved Cmdlet Chars. + /// + internal static string ReservedCmdletCharCommonName { + get { + return ResourceManager.GetString("ReservedCmdletCharCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. - /// - internal static string DscTestsPresentDescription { - get { - return ResourceManager.GetString("DscTestsPresentDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors.. + /// + internal static string ReservedCmdletCharDescription { + get { + return ResourceManager.GetString("ReservedCmdletCharDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to No tests found for resource '{0}' - /// - internal static string DscTestsPresentNoTestsError { - get { - return ResourceManager.GetString("DscTestsPresentNoTestsError", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses a reserved char in its name.. + /// + internal static string ReservedCmdletCharError { + get { + return ResourceManager.GetString("ReservedCmdletCharError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to DscExamplesPresent - /// - internal static string DscExamplesPresent { - get { - return ResourceManager.GetString("DscExamplesPresent", resourceCulture); + + /// + /// Looks up a localized string similar to ReservedCmdletChar. + /// + internal static string ReservedCmdletCharName { + get { + return ResourceManager.GetString("ReservedCmdletCharName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to DSC examples are present - /// - internal static string DscExamplesPresentCommonName { - get { - return ResourceManager.GetString("DscExamplesPresentCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}'. + /// + internal static string ReservedParamsCmdletPrefix { + get { + return ResourceManager.GetString("ReservedParamsCmdletPrefix", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. - /// - internal static string DscExamplesPresentDescription { - get { - return ResourceManager.GetString("DscExamplesPresentDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Reserved Parameters. + /// + internal static string ReservedParamsCommonName { + get { + return ResourceManager.GetString("ReservedParamsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to No examples found for resource '{0}' - /// - internal static string DscExamplesPresentNoExamplesError { - get { - return ResourceManager.GetString("DscExamplesPresentNoExamplesError", resourceCulture); + + /// + /// Looks up a localized string similar to Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs.. + /// + internal static string ReservedParamsDescription { + get { + return ResourceManager.GetString("ReservedParamsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Default Value For Mandatory Parameter - /// - internal static string AvoidDefaultValueForMandatoryParameterCommonName { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' defines the reserved common parameter '{1}'.. + /// + internal static string ReservedParamsError { + get { + return ResourceManager.GetString("ReservedParamsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. - /// - internal static string AvoidDefaultValueForMandatoryParameterDescription { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterDescription", resourceCulture); + + /// + /// Looks up a localized string similar to ReservedParams. + /// + internal static string ReservedParamsName { + get { + return ResourceManager.GetString("ReservedParamsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. - /// - internal static string AvoidDefaultValueForMandatoryParameterError { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterError", resourceCulture); + + /// + /// Looks up a localized string similar to The script. + /// + internal static string ReservedParamsScriptPrefix { + get { + return ResourceManager.GetString("ReservedParamsScriptPrefix", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidDefaultValueForMandatoryParameter - /// - internal static string AvoidDefaultValueForMandatoryParameterName { - get { - return ResourceManager.GetString("AvoidDefaultValueForMandatoryParameterName", resourceCulture); + + /// + /// Looks up a localized string similar to #,(){}[]&/\\$^;:\"'<>|?@`*%+=~. + /// + internal static string ReserverCmdletChars { + get { + return ResourceManager.GetString("ReserverCmdletChars", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid Using Deprecated Manifest Fields - /// - internal static string AvoidUsingDeprecatedManifestFieldsCommonName { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to ReturnCorrectTypesForDSCFunctions. + /// + internal static string ReturnCorrectTypeDSCFunctionsName { + get { + return ResourceManager.GetString("ReturnCorrectTypeDSCFunctionsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. - /// - internal static string AvoidUsingDeprecatedManifestFieldsDescription { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Return Correct Types For DSC Functions. + /// + internal static string ReturnCorrectTypesForDSCFunctionsCommonName { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidUsingDeprecatedManifestFields - /// - internal static string AvoidUsingDeprecatedManifestFieldsName { - get { - return ResourceManager.GetString("AvoidUsingDeprecatedManifestFieldsName", resourceCulture); + + /// + /// Looks up a localized string similar to Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean.. + /// + internal static string ReturnCorrectTypesForDSCFunctionsDescription { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use UTF8 Encoding For Help File - /// - internal static string UseUTF8EncodingForHelpFileCommonName { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2}. + /// + internal static string ReturnCorrectTypesForDSCFunctionsNoTypeError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsNoTypeError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PowerShell help file needs to use UTF8 Encoding. - /// - internal static string UseUTF8EncodingForHelpFileDescription { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileDescription", resourceCulture); + + /// + /// Looks up a localized string similar to {0} function in DSC Class {1} should return object of type {2} instead of type {3}. + /// + internal static string ReturnCorrectTypesForDSCFunctionsWrongTypeError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForDSCFunctionsWrongTypeError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. - /// - internal static string UseUTF8EncodingForHelpFileError { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileError", resourceCulture); + + /// + /// Looks up a localized string similar to {0} function in DSC Resource should return object of type {1} instead of {2}. + /// + internal static string ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForGetTestTargetResourceFunctionsDSCResourceError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseUTF8EncodingForHelpFile - /// - internal static string UseUTF8EncodingForHelpFileName { - get { - return ResourceManager.GetString("UseUTF8EncodingForHelpFileName", resourceCulture); + + /// + /// Looks up a localized string similar to Set function in DSC Class {0} should not return anything. + /// + internal static string ReturnCorrectTypesForSetFunctionsDSCError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForSetFunctionsDSCError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use BOM encoding for non-ASCII files - /// - internal static string UseBOMForUnicodeEncodedFileCommonName { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Set-TargetResource function in DSC Resource should not output anything to the pipeline.. + /// + internal static string ReturnCorrectTypesForSetTargetResourceFunctionsDSCError { + get { + return ResourceManager.GetString("ReturnCorrectTypesForSetTargetResourceFunctionsDSCError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. - /// - internal static string UseBOMForUnicodeEncodedFileDescription { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileDescription", resourceCulture); + + /// + /// Looks up a localized string similar to ScriptDefinition. + /// + internal static string ScriptDefinitionName { + get { + return ResourceManager.GetString("ScriptDefinitionName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Missing BOM encoding for non-ASCII encoded file '{0}' - /// - internal static string UseBOMForUnicodeEncodedFileError { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileError", resourceCulture); + + /// + /// Looks up a localized string similar to www.sharepoint.com. + /// + internal static string SharepointURL { + get { + return ResourceManager.GetString("SharepointURL", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseBOMForUnicodeEncodedFile - /// - internal static string UseBOMForUnicodeEncodedFileName { - get { - return ResourceManager.GetString("UseBOMForUnicodeEncodedFileName", resourceCulture); + + /// + /// Looks up a localized string similar to Should Process. + /// + internal static string ShouldProcessCommonName { + get { + return ResourceManager.GetString("ShouldProcessCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Script definition has a switch parameter default to true. - /// - internal static string AvoidDefaultValueSwitchParameterErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidDefaultValueSwitchParameterErrorScriptDefinition", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior.. + /// + internal static string ShouldProcessDescription { + get { + return ResourceManager.GetString("ShouldProcessDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - /// - internal static string AvoidShouldContinueWithoutForceErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidShouldContinueWithoutForceErrorScriptDefinition", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.. + /// + internal static string ShouldProcessErrorHasAttribute { + get { + return ResourceManager.GetString("ShouldProcessErrorHasAttribute", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - /// - internal static string AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingConvertToSecureStringWithPlainTextErrorScriptDefinition", resourceCulture); + + /// + /// Looks up a localized string similar to A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.. + /// + internal static string ShouldProcessErrorHasAttributeSB { + get { + return ResourceManager.GetString("ShouldProcessErrorHasAttributeSB", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - /// - internal static string AvoidUsingWMICmdletErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingWMICmdletErrorScriptDefinition", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute.. + /// + internal static string ShouldProcessErrorHasCmdlet { + get { + return ResourceManager.GetString("ShouldProcessErrorHasCmdlet", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - /// - internal static string AvoidUsingWriteHostErrorScriptDefinition { - get { - return ResourceManager.GetString("AvoidUsingWriteHostErrorScriptDefinition", resourceCulture); + + /// + /// Looks up a localized string similar to A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute.. + /// + internal static string ShouldProcessErrorHasCmdletSB { + get { + return ResourceManager.GetString("ShouldProcessErrorHasCmdletSB", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to ScriptDefinition - /// - internal static string ScriptDefinitionName { - get { - return ResourceManager.GetString("ScriptDefinitionName", resourceCulture); + + /// + /// Looks up a localized string similar to ShouldProcess. + /// + internal static string ShouldProcessName { + get { + return ResourceManager.GetString("ShouldProcessName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Misleading Backtick - /// - internal static string MisleadingBacktickCommonName { - get { - return ResourceManager.GetString("MisleadingBacktickCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to PS. + /// + internal static string SourceName { + get { + return ResourceManager.GetString("SourceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. - /// - internal static string MisleadingBacktickDescription { - get { - return ResourceManager.GetString("MisleadingBacktickDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Type Not Found. + /// + internal static string TypeNotFoundCommonName { + get { + return ResourceManager.GetString("TypeNotFoundCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to MisleadingBacktick - /// - internal static string MisleadingBacktickName { - get { - return ResourceManager.GetString("MisleadingBacktickName", resourceCulture); + + /// + /// Looks up a localized string similar to Undefined type should not be used. + /// + internal static string TypeNotFoundDescription { + get { + return ResourceManager.GetString("TypeNotFoundDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? - /// - internal static string MisleadingBacktickError { - get { - return ResourceManager.GetString("MisleadingBacktickError", resourceCulture); + + /// + /// Looks up a localized string similar to Type '{0}' is not found. Please check that it is defined.. + /// + internal static string TypeNotFoundError { + get { + return ResourceManager.GetString("TypeNotFoundError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid using null or empty HelpMessage parameter attribute. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeCommonName { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to TypeNotFound. + /// + internal static string TypeNotFoundName { + get { + return ResourceManager.GetString("TypeNotFoundName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeDescription { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet Verbs. + /// + internal static string UseApprovedVerbsCommonName { + get { + return ResourceManager.GetString("UseApprovedVerbsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeError { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeError", resourceCulture); + + /// + /// Looks up a localized string similar to Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices.. + /// + internal static string UseApprovedVerbsDescription { + get { + return ResourceManager.GetString("UseApprovedVerbsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidNullOrEmptyHelpMessageAttribute - /// - internal static string AvoidNullOrEmptyHelpMessageAttributeName { - get { - return ResourceManager.GetString("AvoidNullOrEmptyHelpMessageAttributeName", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses an unapproved verb.. + /// + internal static string UseApprovedVerbsError { + get { + return ResourceManager.GetString("UseApprovedVerbsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use the *ToExport module manifest fields. - /// - internal static string UseToExportFieldsInManifestCommonName { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to UseApprovedVerbs. + /// + internal static string UseApprovedVerbsName { + get { + return ResourceManager.GetString("UseApprovedVerbsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. - /// - internal static string UseToExportFieldsInManifestDescription { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use BOM encoding for non-ASCII files. + /// + internal static string UseBOMForUnicodeEncodedFileCommonName { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Do not use wildcard or $null in this field. Explicitly specify a list for {0}. - /// - internal static string UseToExportFieldsInManifestError { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestError", resourceCulture); + + /// + /// Looks up a localized string similar to For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly.. + /// + internal static string UseBOMForUnicodeEncodedFileDescription { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseToExportFieldsInManifest - /// - internal static string UseToExportFieldsInManifestName { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestName", resourceCulture); + + /// + /// Looks up a localized string similar to Missing BOM encoding for non-ASCII encoded file '{0}'. + /// + internal static string UseBOMForUnicodeEncodedFileError { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Replace {0} with {1} - /// - internal static string AvoidUsingCmdletAliasesCorrectionDescription { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesCorrectionDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseBOMForUnicodeEncodedFile. + /// + internal static string UseBOMForUnicodeEncodedFileName { + get { + return ResourceManager.GetString("UseBOMForUnicodeEncodedFileName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Set {0} type to SecureString - /// - internal static string AvoidUsingPlainTextForPasswordCorrectionDescription { - get { - return ResourceManager.GetString("AvoidUsingPlainTextForPasswordCorrectionDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use Cmdlet Correctly. + /// + internal static string UseCmdletCorrectlyCommonName { + get { + return ResourceManager.GetString("UseCmdletCorrectlyCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Add {0} = {1} to the module manifest - /// - internal static string MissingModuleManifestFieldCorrectionDescription { - get { - return ResourceManager.GetString("MissingModuleManifestFieldCorrectionDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet should be called with the mandatory parameters.. + /// + internal static string UseCmdletCorrectlyDescription { + get { + return ResourceManager.GetString("UseCmdletCorrectlyDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Replace {0} with {1} - /// - internal static string UseToExportFieldsInManifestCorrectionDescription { - get { - return ResourceManager.GetString("UseToExportFieldsInManifestCorrectionDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied.. + /// + internal static string UseCmdletCorrectlyError { + get { + return ResourceManager.GetString("UseCmdletCorrectlyError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Create hashtables with literal initializers - /// - internal static string UseLiteralInitilializerForHashtableCommonName { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to UseCmdletCorrectly. + /// + internal static string UseCmdletCorrectlyName { + get { + return ResourceManager.GetString("UseCmdletCorrectlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use compatible cmdlets. + /// + internal static string UseCompatibleCmdletsCommonName { + get { + return ResourceManager.GetString("UseCompatibleCmdletsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default - /// - internal static string UseLiteralInitilializerForHashtableDescription { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use cmdlets compatible with the given PowerShell version and edition and operating system. + /// + internal static string UseCompatibleCmdletsDescription { + get { + return ResourceManager.GetString("UseCompatibleCmdletsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Create hashtables with literal initliazers - /// - internal static string UseLiteralInitilializerForHashtableError { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableError", resourceCulture); + + /// + /// Looks up a localized string similar to '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}'. + /// + internal static string UseCompatibleCmdletsError { + get { + return ResourceManager.GetString("UseCompatibleCmdletsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseLiteralInitializerForHashtable - /// - internal static string UseLiteralInitilializerForHashtableName { - get { - return ResourceManager.GetString("UseLiteralInitilializerForHashtableName", resourceCulture); + + /// + /// Looks up a localized string similar to UseCompatibleCmdlets. + /// + internal static string UseCompatibleCmdletsName { + get { + return ResourceManager.GetString("UseCompatibleCmdletsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCompatibleCmdlets - /// - internal static string UseCompatibleCmdletsName { - get { - return ResourceManager.GetString("UseCompatibleCmdletsName", resourceCulture); + + /// + /// Looks up a localized string similar to The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. + /// + internal static string UseCompatibleCommandsCommandError { + get { + return ResourceManager.GetString("UseCompatibleCommandsCommandError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use compatible cmdlets - /// - internal static string UseCompatibleCmdletsCommonName { - get { - return ResourceManager.GetString("UseCompatibleCmdletsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use compatible commands. + /// + internal static string UseCompatibleCommandsCommonName { + get { + return ResourceManager.GetString("UseCompatibleCommandsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use cmdlets compatible with the given PowerShell version and edition and operating system - /// - internal static string UseCompatibleCmdletsDescription { - get { - return ResourceManager.GetString("UseCompatibleCmdletsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use commands compatible with the given PowerShell version and operating system. + /// + internal static string UseCompatibleCommandsDescription { + get { + return ResourceManager.GetString("UseCompatibleCommandsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' - /// - internal static string UseCompatibleCmdletsError { - get { - return ResourceManager.GetString("UseCompatibleCmdletsError", resourceCulture); + + /// + /// Looks up a localized string similar to UseCompatibleCommands. + /// + internal static string UseCompatibleCommandsName { + get { + return ResourceManager.GetString("UseCompatibleCommandsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCompatibleCommands - /// - internal static string UseCompatibleCommandsName { - get { - return ResourceManager.GetString("UseCompatibleCommandsName", resourceCulture); + + /// + /// Looks up a localized string similar to The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}'. + /// + internal static string UseCompatibleCommandsParameterError { + get { + return ResourceManager.GetString("UseCompatibleCommandsParameterError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use compatible commands - /// - internal static string UseCompatibleCommandsCommonName { - get { - return ResourceManager.GetString("UseCompatibleCommandsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use compatible syntax. + /// + internal static string UseCompatibleSyntaxCommonName { + get { + return ResourceManager.GetString("UseCompatibleSyntaxCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use commands compatible with the given PowerShell version and operating system - /// - internal static string UseCompatibleCommandsDescription { - get { - return ResourceManager.GetString("UseCompatibleCommandsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use the '{0}' syntax instead for compatibility with PowerShell versions {1}. + /// + internal static string UseCompatibleSyntaxCorrection { + get { + return ResourceManager.GetString("UseCompatibleSyntaxCorrection", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - /// - internal static string UseCompatibleCommandsCommandError { - get { - return ResourceManager.GetString("UseCompatibleCommandsCommandError", resourceCulture); + + /// + /// Looks up a localized string similar to Use script syntax compatible with the given PowerShell versions. + /// + internal static string UseCompatibleSyntaxDescription { + get { + return ResourceManager.GetString("UseCompatibleSyntaxDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' - /// - internal static string UseCompatibleCommandsParameterError { - get { - return ResourceManager.GetString("UseCompatibleCommandsParameterError", resourceCulture); + + /// + /// Looks up a localized string similar to The {0} syntax '{1}' is not available by default in PowerShell versions {2}. + /// + internal static string UseCompatibleSyntaxError { + get { + return ResourceManager.GetString("UseCompatibleSyntaxError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCompatibleTypes - /// - internal static string UseCompatibleTypesName { - get { - return ResourceManager.GetString("UseCompatibleTypesName", resourceCulture); + + /// + /// Looks up a localized string similar to UseCompatibleSyntax. + /// + internal static string UseCompatibleSyntaxName { + get { + return ResourceManager.GetString("UseCompatibleSyntaxName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use compatible types - /// - internal static string UseCompatibleTypesCommonName { - get { - return ResourceManager.GetString("UseCompatibleTypesCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use compatible types. + /// + internal static string UseCompatibleTypesCommonName { + get { + return ResourceManager.GetString("UseCompatibleTypesCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use types compatible with the given PowerShell version and operating system - /// - internal static string UseCompatibleTypesDescription { - get { - return ResourceManager.GetString("UseCompatibleTypesDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use types compatible with the given PowerShell version and operating system. + /// + internal static string UseCompatibleTypesDescription { + get { + return ResourceManager.GetString("UseCompatibleTypesDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - /// - internal static string UseCompatibleTypesTypeError { - get { - return ResourceManager.GetString("UseCompatibleTypesTypeError", resourceCulture); + + /// + /// Looks up a localized string similar to The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}'. + /// + internal static string UseCompatibleTypesMemberError { + get { + return ResourceManager.GetString("UseCompatibleTypesMemberError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - /// - internal static string UseCompatibleTypesMethodError { - get { - return ResourceManager.GetString("UseCompatibleTypesMethodError", resourceCulture); + + /// + /// Looks up a localized string similar to The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}'. + /// + internal static string UseCompatibleTypesMethodError { + get { + return ResourceManager.GetString("UseCompatibleTypesMethodError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - /// - internal static string UseCompatibleTypesMemberError { - get { - return ResourceManager.GetString("UseCompatibleTypesMemberError", resourceCulture); + + /// + /// Looks up a localized string similar to UseCompatibleTypes. + /// + internal static string UseCompatibleTypesName { + get { + return ResourceManager.GetString("UseCompatibleTypesName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCompatibleSyntax - /// - internal static string UseCompatibleSyntaxName { - get { - return ResourceManager.GetString("UseCompatibleSyntaxName", resourceCulture); + + /// + /// Looks up a localized string similar to The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. + /// + internal static string UseCompatibleTypesTypeAcceleratorError { + get { + return ResourceManager.GetString("UseCompatibleTypesTypeAcceleratorError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use compatible syntax - /// - internal static string UseCompatibleSyntaxCommonName { - get { - return ResourceManager.GetString("UseCompatibleSyntaxCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}'. + /// + internal static string UseCompatibleTypesTypeError { + get { + return ResourceManager.GetString("UseCompatibleTypesTypeError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use script syntax compatible with the given PowerShell versions - /// - internal static string UseCompatibleSyntaxDescription { - get { - return ResourceManager.GetString("UseCompatibleSyntaxDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use consistent indentation. + /// + internal static string UseConsistentIndentationCommonName { + get { + return ResourceManager.GetString("UseConsistentIndentationCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The {0} syntax '{1}' is not available by default in PowerShell versions {2} - /// - internal static string UseCompatibleSyntaxError { - get { - return ResourceManager.GetString("UseCompatibleSyntaxError", resourceCulture); + + /// + /// Looks up a localized string similar to Each statement block should have a consistent indenation.. + /// + internal static string UseConsistentIndentationDescription { + get { + return ResourceManager.GetString("UseConsistentIndentationDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use the '{0}' syntax instead for compatibility with PowerShell versions {1} - /// - internal static string UseCompatibleSyntaxCorrection { - get { - return ResourceManager.GetString("UseCompatibleSyntaxCorrection", resourceCulture); + + /// + /// Looks up a localized string similar to Indentation not consistent. + /// + internal static string UseConsistentIndentationError { + get { + return ResourceManager.GetString("UseConsistentIndentationError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - /// - internal static string UseCompatibleTypesTypeAcceleratorError { - get { - return ResourceManager.GetString("UseCompatibleTypesTypeAcceleratorError", resourceCulture); + + /// + /// Looks up a localized string similar to UseConsistentIndentation. + /// + internal static string UseConsistentIndentationName { + get { + return ResourceManager.GetString("UseConsistentIndentationName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid global functiosn and aliases - /// - internal static string AvoidGlobalFunctionsCommonName { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use whitespaces. + /// + internal static string UseConsistentWhitespaceCommonName { + get { + return ResourceManager.GetString("UseConsistentWhitespaceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. - /// - internal static string AvoidGlobalFunctionsDescription { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';'). + /// + internal static string UseConsistentWhitespaceDescription { + get { + return ResourceManager.GetString("UseConsistentWhitespaceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid creating functions with a Global scope. - /// - internal static string AvoidGlobalFunctionsError { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsError", resourceCulture); + + /// + /// Looks up a localized string similar to Use space after open brace.. + /// + internal static string UseConsistentWhitespaceErrorAfterOpeningBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorAfterOpeningBrace", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidGlobalFunctions - /// - internal static string AvoidGlobalFunctionsName { - get { - return ResourceManager.GetString("AvoidGlobalFunctionsName", resourceCulture); + + /// + /// Looks up a localized string similar to Use space before closing brace.. + /// + internal static string UseConsistentWhitespaceErrorBeforeClosingInnerBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeClosingInnerBrace", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid global aliases. - /// - internal static string AvoidGlobalAliasesCommonName { - get { - return ResourceManager.GetString("AvoidGlobalAliasesCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use space before open brace.. + /// + internal static string UseConsistentWhitespaceErrorBeforeOpeningBrace { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeOpeningBrace", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. - /// - internal static string AvoidGlobalAliasesDescription { - get { - return ResourceManager.GetString("AvoidGlobalAliasesDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use space before open parenthesis.. + /// + internal static string UseConsistentWhitespaceErrorBeforeParen { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeParen", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid creating aliases with a Global scope. - /// - internal static string AvoidGlobalAliasesError { - get { - return ResourceManager.GetString("AvoidGlobalAliasesError", resourceCulture); + + /// + /// Looks up a localized string similar to Use space before and after binary and assignment operators.. + /// + internal static string UseConsistentWhitespaceErrorOperator { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorOperator", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidGlobalAliases - /// - internal static string AvoidGlobalAliasesName { - get { - return ResourceManager.GetString("AvoidGlobalAliasesName", resourceCulture); + + /// + /// Looks up a localized string similar to Use space after a comma.. + /// + internal static string UseConsistentWhitespaceErrorSeparatorComma { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorComma", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidTrailingWhitespace - /// - internal static string AvoidTrailingWhitespaceName { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceName", resourceCulture); + + /// + /// Looks up a localized string similar to Use space after a semicolon.. + /// + internal static string UseConsistentWhitespaceErrorSeparatorSemi { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorSemi", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid trailing whitespace - /// - internal static string AvoidTrailingWhitespaceCommonName { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Use space after pipe.. + /// + internal static string UseConsistentWhitespaceErrorSpaceAfterPipe { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceAfterPipe", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Each line should have no trailing whitespace. - /// - internal static string AvoidTrailingWhitespaceDescription { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use space before pipe.. + /// + internal static string UseConsistentWhitespaceErrorSpaceBeforePipe { + get { + return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceBeforePipe", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Line has trailing whitespace - /// - internal static string AvoidTrailingWhitespaceError { - get { - return ResourceManager.GetString("AvoidTrailingWhitespaceError", resourceCulture); + + /// + /// Looks up a localized string similar to UseConsistentWhitespace. + /// + internal static string UseConsistentWhitespaceName { + get { + return ResourceManager.GetString("UseConsistentWhitespaceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidLongLines - /// - internal static string AvoidLongLinesName { - get { - return ResourceManager.GetString("AvoidLongLinesName", resourceCulture); + + /// + /// Looks up a localized string similar to Use exact casing of cmdlet/function name.. + /// + internal static string UseCorrectCasingCommonName { + get { + return ResourceManager.GetString("UseCorrectCasingCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Avoid long lines - /// - internal static string AvoidLongLinesCommonName { - get { - return ResourceManager.GetString("AvoidLongLinesCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to For better readability and consistency, use the exact casing of the cmdlet/function.. + /// + internal static string UseCorrectCasingDescription { + get { + return ResourceManager.GetString("UseCorrectCasingDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Line lengths should be less than the configured maximum - /// - internal static string AvoidLongLinesDescription { - get { - return ResourceManager.GetString("AvoidLongLinesDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet/Function does not match its exact casing '{0}'.. + /// + internal static string UseCorrectCasingError { + get { + return ResourceManager.GetString("UseCorrectCasingError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Line exceeds the configured maximum length of {0} characters - /// - internal static string AvoidLongLinesError { - get { - return ResourceManager.GetString("AvoidLongLinesError", resourceCulture); + + /// + /// Looks up a localized string similar to UseCorrectCasing. + /// + internal static string UseCorrectCasingName { + get { + return ResourceManager.GetString("UseCorrectCasingName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PlaceOpenBrace - /// - internal static string PlaceOpenBraceName { - get { - return ResourceManager.GetString("PlaceOpenBraceName", resourceCulture); + + /// + /// Looks up a localized string similar to Extra Variables. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsCommonName { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Place open braces consistently - /// - internal static string PlaceOpenBraceCommonName { - get { - return ResourceManager.GetString("PlaceOpenBraceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Ensure declared variables are used elsewhere in the script and not just during assignment.. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsDescription { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Place open braces either on the same line as the preceding expression or on a new line. - /// - internal static string PlaceOpenBraceDescription { - get { - return ResourceManager.GetString("PlaceOpenBraceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to The variable '{0}' is assigned but never used.. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsError { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Open brace not on same line as preceding keyword. It should be on the same line. - /// - internal static string PlaceOpenBraceErrorShouldBeOnSameLine { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorShouldBeOnSameLine", resourceCulture); + + /// + /// Looks up a localized string similar to UseDeclaredVarsMoreThanAssignments. + /// + internal static string UseDeclaredVarsMoreThanAssignmentsName { + get { + return ResourceManager.GetString("UseDeclaredVarsMoreThanAssignmentsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Open brace is not on a new line. - /// - internal static string PlaceOpenBraceErrorShouldNotBeOnSameLine { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorShouldNotBeOnSameLine", resourceCulture); + + /// + /// Looks up a localized string similar to Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions. + /// + internal static string UseIdenticalMandatoryParametersDSCCommonName { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to There is no new line after open brace. - /// - internal static string PlaceOpenBraceErrorNoNewLineAfterBrace { - get { - return ResourceManager.GetString("PlaceOpenBraceErrorNoNewLineAfterBrace", resourceCulture); + + /// + /// Looks up a localized string similar to The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters.. + /// + internal static string UseIdenticalMandatoryParametersDSCDescription { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PlaceCloseBrace - /// - internal static string PlaceCloseBraceName { - get { - return ResourceManager.GetString("PlaceCloseBraceName", resourceCulture); + + /// + /// Looks up a localized string similar to The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s).. + /// + internal static string UseIdenticalMandatoryParametersDSCError { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Place close braces - /// - internal static string PlaceCloseBraceCommonName { - get { - return ResourceManager.GetString("PlaceCloseBraceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to UseIdenticalMandatoryParametersForDSC. + /// + internal static string UseIdenticalMandatoryParametersDSCName { + get { + return ResourceManager.GetString("UseIdenticalMandatoryParametersDSCName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Close brace should be on a new line by itself. - /// - internal static string PlaceCloseBraceDescription { - get { - return ResourceManager.GetString("PlaceCloseBraceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use Identical Parameters For DSC Test and Set Functions. + /// + internal static string UseIdenticalParametersDSCCommonName { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Close brace is not on a new line. - /// - internal static string PlaceCloseBraceErrorShouldBeOnNewLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldBeOnNewLine", resourceCulture); + + /// + /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters.. + /// + internal static string UseIdenticalParametersDSCDescription { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Close brace does not follow a non-empty line. - /// - internal static string PlaceCloseBraceErrorShouldNotFollowEmptyLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldNotFollowEmptyLine", resourceCulture); + + /// + /// Looks up a localized string similar to The Test and Set-TargetResource functions of DSC Resource must have the same parameters.. + /// + internal static string UseIdenticalParametersDSCError { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Close brace does not follow a new line. - /// - internal static string PlaceCloseBraceErrorShouldFollowNewLine { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldFollowNewLine", resourceCulture); + + /// + /// Looks up a localized string similar to UseIdenticalParametersForDSC. + /// + internal static string UseIdenticalParametersDSCName { + get { + return ResourceManager.GetString("UseIdenticalParametersDSCName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Close brace before a branch statement is followed by a new line. - /// - internal static string PlaceCloseBraceErrorShouldCuddleBranchStatement { - get { - return ResourceManager.GetString("PlaceCloseBraceErrorShouldCuddleBranchStatement", resourceCulture); + + /// + /// Looks up a localized string similar to Create hashtables with literal initializers. + /// + internal static string UseLiteralInitilializerForHashtableCommonName { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseConsistentIndentation - /// - internal static string UseConsistentIndentationName { - get { - return ResourceManager.GetString("UseConsistentIndentationName", resourceCulture); + + /// + /// Looks up a localized string similar to Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default. + /// + internal static string UseLiteralInitilializerForHashtableDescription { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use consistent indentation - /// - internal static string UseConsistentIndentationCommonName { - get { - return ResourceManager.GetString("UseConsistentIndentationCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Create hashtables with literal initliazers. + /// + internal static string UseLiteralInitilializerForHashtableError { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Each statement block should have a consistent indenation. - /// - internal static string UseConsistentIndentationDescription { - get { - return ResourceManager.GetString("UseConsistentIndentationDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseLiteralInitializerForHashtable. + /// + internal static string UseLiteralInitilializerForHashtableName { + get { + return ResourceManager.GetString("UseLiteralInitilializerForHashtableName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Indentation not consistent - /// - internal static string UseConsistentIndentationError { - get { - return ResourceManager.GetString("UseConsistentIndentationError", resourceCulture); + + /// + /// Looks up a localized string similar to Use OutputType Correctly. + /// + internal static string UseOutputTypeCorrectlyCommonName { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseConsistentWhitespace - /// - internal static string UseConsistentWhitespaceName { - get { - return ResourceManager.GetString("UseConsistentWhitespaceName", resourceCulture); + + /// + /// Looks up a localized string similar to The return types of a cmdlet should be declared using the OutputType attribute.. + /// + internal static string UseOutputTypeCorrectlyDescription { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use whitespaces - /// - internal static string UseConsistentWhitespaceCommonName { - get { - return ResourceManager.GetString("UseConsistentWhitespaceCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute.. + /// + internal static string UseOutputTypeCorrectlyError { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') - /// - internal static string UseConsistentWhitespaceDescription { - get { - return ResourceManager.GetString("UseConsistentWhitespaceDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseOutputTypeCorrectly. + /// + internal static string UseOutputTypeCorrectlyName { + get { + return ResourceManager.GetString("UseOutputTypeCorrectlyName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space before open brace. - /// - internal static string UseConsistentWhitespaceErrorBeforeOpeningBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeOpeningBrace", resourceCulture); + + /// + /// Looks up a localized string similar to Use process block for pipeline commands. + /// + internal static string UseProcessBlockForPipelineCommandsCommonName { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space before open parenthesis. - /// - internal static string UseConsistentWhitespaceErrorBeforeParen { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeParen", resourceCulture); + + /// + /// Looks up a localized string similar to If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features.. + /// + internal static string UseProcessBlockForPipelineCommandsDescription { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space before and after binary and assignment operators. - /// - internal static string UseConsistentWhitespaceErrorOperator { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorOperator", resourceCulture); + + /// + /// Looks up a localized string similar to Commands that support pipeline input should return output in a process block.. + /// + internal static string UseProcessBlockForPipelineCommandsError { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space after a comma. - /// - internal static string UseConsistentWhitespaceErrorSeparatorComma { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorComma", resourceCulture); + + /// + /// Looks up a localized string similar to UseProcessBlockForPipelineCommands. + /// + internal static string UseProcessBlockForPipelineCommandsName { + get { + return ResourceManager.GetString("UseProcessBlockForPipelineCommandsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space after a semicolon. - /// - internal static string UseConsistentWhitespaceErrorSeparatorSemi { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSeparatorSemi", resourceCulture); + + /// + /// Looks up a localized string similar to Use PSCredential type.. + /// + internal static string UsePSCredentialTypeCommonName { + get { + return ResourceManager.GetString("UsePSCredentialTypeCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseSupportsShouldProcess - /// - internal static string UseSupportsShouldProcessName { - get { - return ResourceManager.GetString("UseSupportsShouldProcessName", resourceCulture); + + /// + /// Looks up a localized string similar to For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. . + /// + internal static string UsePSCredentialTypeDescription { + get { + return ResourceManager.GetString("UsePSCredentialTypeDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use SupportsShouldProcess - /// - internal static string UseSupportsShouldProcessCommonName { - get { - return ResourceManager.GetString("UseSupportsShouldProcessCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute.. + /// + internal static string UsePSCredentialTypeError { + get { + return ResourceManager.GetString("UsePSCredentialTypeError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. - /// - internal static string UseSupportsShouldProcessDescription { - get { - return ResourceManager.GetString("UseSupportsShouldProcessDescription", resourceCulture); + + /// + /// Looks up a localized string similar to The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. . + /// + internal static string UsePSCredentialTypeErrorSB { + get { + return ResourceManager.GetString("UsePSCredentialTypeErrorSB", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. - /// - internal static string UseSupportsShouldProcessError { - get { - return ResourceManager.GetString("UseSupportsShouldProcessError", resourceCulture); + + /// + /// Looks up a localized string similar to UsePSCredentialType. + /// + internal static string UsePSCredentialTypeName { + get { + return ResourceManager.GetString("UsePSCredentialTypeName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AlignAssignmentStatement - /// - internal static string AlignAssignmentStatementName { - get { - return ResourceManager.GetString("AlignAssignmentStatementName", resourceCulture); + + /// + /// Looks up a localized string similar to Use ShouldProcess For State Changing Functions. + /// + internal static string UseShouldProcessForStateChangingFunctionsCommonName { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Align assignment statement - /// - internal static string AlignAssignmentStatementCommonName { - get { - return ResourceManager.GetString("AlignAssignmentStatementCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'.. + /// + internal static string UseShouldProcessForStateChangingFunctionsDescrption { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsDescrption", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Line up assignment statements such that the assignment operator are aligned. - /// - internal static string AlignAssignmentStatementDescription { - get { - return ResourceManager.GetString("AlignAssignmentStatementDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'.. + /// + internal static string UseShouldProcessForStateChangingFunctionsError { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Assignment statements are not aligned - /// - internal static string AlignAssignmentStatementError { - get { - return ResourceManager.GetString("AlignAssignmentStatementError", resourceCulture); + + /// + /// Looks up a localized string similar to UseShouldProcessForStateChangingFunctions. + /// + internal static string UseShouldProcessForStateChangingFunctionsName { + get { + return ResourceManager.GetString("UseShouldProcessForStateChangingFunctionsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '=' is not an assignment operator. Did you mean the equality operator '-eq'? - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet Singular Noun. + /// + internal static string UseSingularNounsCommonName { + get { + return ResourceManager.GetString("UseSingularNounsCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PossibleIncorrectUsageOfAssignmentOperator - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorName", resourceCulture); + + /// + /// Looks up a localized string similar to Cmdlet should use singular instead of plural nouns.. + /// + internal static string UseSingularNounsDescription { + get { + return ResourceManager.GetString("UseSingularNounsDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use a different variable name - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariable { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariable", resourceCulture); + + /// + /// Looks up a localized string similar to The cmdlet '{0}' uses a plural noun. A singular noun should be used instead.. + /// + internal static string UseSingularNounsError { + get { + return ResourceManager.GetString("UseSingularNounsError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Changing automtic variables might have undesired side effects - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableCommonName { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to UseSingularNouns. + /// + internal static string UseSingularNounsName { + get { + return ResourceManager.GetString("UseSingularNounsName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to This automatic variables is built into PowerShell and readonly. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableDescription { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Missing '{0}' function. DSC Class must implement Get, Set and Test functions.. + /// + internal static string UseStandardDSCFunctionsInClassError { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInClassError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableError { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableError", resourceCulture); + + /// + /// Looks up a localized string similar to Use Standard Get/Set/Test TargetResource functions in DSC Resource . + /// + internal static string UseStandardDSCFunctionsInResourceCommonName { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to AvoidAssignmentToAutomaticVariable - /// - internal static string AvoidAssignmentToAutomaticVariableName { - get { - return ResourceManager.GetString("AvoidAssignmentToAutomaticVariableName", resourceCulture); + + /// + /// Looks up a localized string similar to DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions.. + /// + internal static string UseStandardDSCFunctionsInResourceDescription { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. - /// - internal static string AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error { - get { - return ResourceManager.GetString("AvoidAssignmentToReadOnlyAutomaticVariableIntroducedInPowerShell6_0Error", resourceCulture); + + /// + /// Looks up a localized string similar to Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions.. + /// + internal static string UseStandardDSCFunctionsInResourceError { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. - /// - internal static string AvoidUsingCmdletAliasesMissingGetPrefixError { - get { - return ResourceManager.GetString("AvoidUsingCmdletAliasesMissingGetPrefixError", resourceCulture); + + /// + /// Looks up a localized string similar to StandardDSCFunctionsInResource. + /// + internal static string UseStandardDSCFunctionsInResourceName { + get { + return ResourceManager.GetString("UseStandardDSCFunctionsInResourceName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorDescription { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorDescription", resourceCulture); + + /// + /// Looks up a localized string similar to Use SupportsShouldProcess. + /// + internal static string UseSupportsShouldProcessCommonName { + get { + return ResourceManager.GetString("UseSupportsShouldProcessCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. - /// - internal static string PossibleIncorrectUsageOfAssignmentOperatorError { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfAssignmentOperatorError", resourceCulture); + + /// + /// Looks up a localized string similar to Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess.. + /// + internal static string UseSupportsShouldProcessDescription { + get { + return ResourceManager.GetString("UseSupportsShouldProcessDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorCommonName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute.. + /// + internal static string UseSupportsShouldProcessError { + get { + return ResourceManager.GetString("UseSupportsShouldProcessError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorDescription { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseSupportsShouldProcess. + /// + internal static string UseSupportsShouldProcessName { + get { + return ResourceManager.GetString("UseSupportsShouldProcessName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorError { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorError", resourceCulture); + + /// + /// Looks up a localized string similar to Use the *ToExport module manifest fields.. + /// + internal static string UseToExportFieldsInManifestCommonName { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to PossibleIncorrectUsageOfRedirectionOperator - /// - internal static string PossibleIncorrectUsageOfRedirectionOperatorName { - get { - return ResourceManager.GetString("PossibleIncorrectUsageOfRedirectionOperatorName", resourceCulture); + + /// + /// Looks up a localized string similar to Replace {0} with {1}. + /// + internal static string UseToExportFieldsInManifestCorrectionDescription { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestCorrectionDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use $null on the left hand side for safe comparison with $null. - /// - internal static string PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription { - get { - return ResourceManager.GetString("PossibleIncorrectComparisonWithNullSuggesteCorrectionDescription", resourceCulture); + + /// + /// Looks up a localized string similar to In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module.. + /// + internal static string UseToExportFieldsInManifestDescription { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space after open brace. - /// - internal static string UseConsistentWhitespaceErrorAfterOpeningBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorAfterOpeningBrace", resourceCulture); + + /// + /// Looks up a localized string similar to Do not use wildcard or $null in this field. Explicitly specify a list for {0}. . + /// + internal static string UseToExportFieldsInManifestError { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space before closing brace. - /// - internal static string UseConsistentWhitespaceErrorBeforeClosingInnerBrace { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorBeforeClosingInnerBrace", resourceCulture); + + /// + /// Looks up a localized string similar to UseToExportFieldsInManifest. + /// + internal static string UseToExportFieldsInManifestName { + get { + return ResourceManager.GetString("UseToExportFieldsInManifestName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space after pipe. - /// - internal static string UseConsistentWhitespaceErrorSpaceAfterPipe { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceAfterPipe", resourceCulture); + + /// + /// Looks up a localized string similar to Use Type At Variable Assignment. + /// + internal static string UseTypeAtVariableAssignmentCommonName { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use space before pipe. - /// - internal static string UseConsistentWhitespaceErrorSpaceBeforePipe { - get { - return ResourceManager.GetString("UseConsistentWhitespaceErrorSpaceBeforePipe", resourceCulture); + + /// + /// Looks up a localized string similar to Types should be specified at variable assignments to maintain readability and maintainability of script.. + /// + internal static string UseTypeAtVariableAssignmentDescription { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use exact casing of cmdlet/function name. - /// - internal static string UseCorrectCasingCommonName { - get { - return ResourceManager.GetString("UseCorrectCasingCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to Specify type at the assignment of variable '{0}'. + /// + internal static string UseTypeAtVariableAssignmentError { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to For better readability and consistency, use the exact casing of the cmdlet/function. - /// - internal static string UseCorrectCasingDescription { - get { - return ResourceManager.GetString("UseCorrectCasingDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseTypeAtVariableAssignment. + /// + internal static string UseTypeAtVariableAssignmentName { + get { + return ResourceManager.GetString("UseTypeAtVariableAssignmentName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Cmdlet/Function does not match its exact casing '{0}'. - /// - internal static string UseCorrectCasingError { - get { - return ResourceManager.GetString("UseCorrectCasingError", resourceCulture); + + /// + /// Looks up a localized string similar to Use UTF8 Encoding For Help File. + /// + internal static string UseUTF8EncodingForHelpFileCommonName { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseCorrectCasing - /// - internal static string UseCorrectCasingName { - get { - return ResourceManager.GetString("UseCorrectCasingName", resourceCulture); + + /// + /// Looks up a localized string similar to PowerShell help file needs to use UTF8 Encoding.. + /// + internal static string UseUTF8EncodingForHelpFileDescription { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileDescription", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Use process block for pipeline commands - /// - internal static string UseProcessBlockForPipelineCommandsCommonName { - get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsCommonName", resourceCulture); + + /// + /// Looks up a localized string similar to File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file.. + /// + internal static string UseUTF8EncodingForHelpFileError { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileError", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. - /// - internal static string UseProcessBlockForPipelineCommandsDescription { - get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsDescription", resourceCulture); + + /// + /// Looks up a localized string similar to UseUTF8EncodingForHelpFile. + /// + internal static string UseUTF8EncodingForHelpFileName { + get { + return ResourceManager.GetString("UseUTF8EncodingForHelpFileName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to Commands that support pipeline input should return output in a process block. - /// - internal static string UseProcessBlockForPipelineCommandsError { - get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsError", resourceCulture); + + /// + /// Looks up a localized string similar to Use verbose message in DSC resource. + /// + internal static string UseVerboseMessageInDSCResourceCommonName { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceCommonName", resourceCulture); + } } - } - - /// - /// Looks up a localized string similar to UseProcessBlockForPipelineCommands - /// - internal static string UseProcessBlockForPipelineCommandsName { - get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsName", resourceCulture); + + /// + /// Looks up a localized string similar to It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed.. + /// + internal static string UseVerboseMessageInDSCResourceDescription { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application.. + /// + internal static string UseVerboseMessageInDSCResourceErrorFunction { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceErrorFunction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UseVerboseMessageInDSCResource. + /// + internal static string UseVerboseMessageInDSCResourceName { + get { + return ResourceManager.GetString("UseVerboseMessageInDSCResourceName", resourceCulture); + } } } - -} } From 86673bf093d98cabc0df858614175b0bbe77aae3 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sat, 16 Nov 2019 18:25:39 +0000 Subject: [PATCH 04/23] minimise diff in resx file --- Rules/Strings.resx | 2188 ++++++++++++++++++++++---------------------- 1 file changed, 1094 insertions(+), 1094 deletions(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index 964b6bf64..e52c95907 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1,1095 +1,1095 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. - - - Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. - - - Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. - - - Avoid Using Empty Catch Block - - - The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. - - - Avoid Using Invoke-Expression - - - Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. - - - Avoid Using Positional Parameters - - - Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. - - - The cmdlet '{0}' does not have a help comment. - - - Basic Comment Help - - - Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. - - - The cmdlet '{0}' uses an unapproved verb. - - - Cmdlet Verbs - - - Ensure declared variables are used elsewhere in the script and not just during assignment. - - - The variable '{0}' is assigned but never used. - - - Extra Variables - - - Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. - - - Found global variable '{0}'. - - - No Global Variables - - - Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. - - - $null should be on the left side of equality comparisons. - - - Null Comparison - - - Checks that cmdlets and parameters have more than one character. - - - The cmdlet name '{0}' only has one character. - - - The cmdlet '{0}' has a parameter '{1}' that only has one character. - - - A script block has a parameter '{0}' that only has one character. - - - One Char - - - For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. - - - The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - Use PSCredential type. - - - Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. - - - The cmdlet '{0}' uses a reserved char in its name. - - - Reserved Cmdlet Chars - - - The cmdlet '{0}' - - - Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. - - - '{0}' defines the reserved common parameter '{1}'. - - - Reserved Parameters - - - The script - - - #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ - - - Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. - - - '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - Should Process - - - PS - - - It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. - - - There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. - - - Use verbose message in DSC resource - - - Some fields of the module manifest (such as ModuleVersion) are required. - - - Module Manifest Fields - - - If a script file is in a PowerShell module folder, then that folder must be loadable. - - - Cannot load the module '{0}' that file '{1}' is in. - - - Module Must Be Loadable - - - Error Message is Null. - - - Password parameters that take in plaintext will expose passwords and compromise the security of your system. - - - Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. - - - Avoid Using Plain Text For Password Parameter - - - Using ConvertTo-SecureString with plain text will expose secure information. - - - File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Avoid Using SecureString With Plain Text - - - Switch parameter should not default to true. - - - File '{0}' has a switch parameter default to true. - - - Switch Parameters Should Not Default To True - - - Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. - - - Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Avoid Using ShouldContinue Without Boolean Force Parameter - - - Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. - - - File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. - - - Avoid Using Clear-Host - - - File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - - - Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - - - File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - Avoid Using Write-Host - - - Cmdlet should use singular instead of plural nouns. - - - The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. - - - Cmdlet Singular Noun - - - AvoidUsingCmdletAliases - - - AvoidDefaultValueSwitchParameter - - - AvoidGlobalVars - - - AvoidShouldContinueWithoutForce - - - AvoidUnloadableModule - - - AvoidUsingClearHost - - - AvoidUsingConvertToSecureStringWithPlainText - - - AvoidUsingEmptyCatchBlock - - - AvoidUsingInvokeExpression - - - AvoidUsingPlainTextForPassword - - - AvoidUsingPositionalParameters - - - AvoidUsingWriteHost - - - OneChar - - - PossibleIncorrectComparisonWithNull - - - ProvideCommentHelp - - - ReservedCmdletChar - - - ReservedParams - - - ShouldProcess - - - UseApprovedVerbs - - - UseDeclaredVarsMoreThanAssignments - - - UsePSCredentialType - - - UseSingularNouns - - - MissingModuleManifestField - - - UseVerboseMessageInDSCResource - - - Command Not Found - - - Commands that are undefined or do not exist should not be used. - - - Command '{0}' Is Not Found - - - CommandNotFound - - - Type Not Found - - - Undefined type should not be used - - - Type '{0}' is not found. Please check that it is defined. - - - TypeNotFound - - - Use Cmdlet Correctly - - - Cmdlet should be called with the mandatory parameters. - - - Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. - - - UseCmdletCorrectly - - - Use Type At Variable Assignment - - - Types should be specified at variable assignments to maintain readability and maintainability of script. - - - Specify type at the assignment of variable '{0}' - - - UseTypeAtVariableAssignment - - - Avoid Using Username and Password Parameters - - - Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. - - - Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. - - - AvoidUsingUsernameAndPasswordParams - - - Avoid Invoking Empty Members - - - Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. - - - '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. - - - AvoidInvokingEmptyMembers - - - Avoid Using ComputerName Hardcoded - - - The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. - - - The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. - - - AvoidUsingComputerNameHardcoded - - - Empty catch block is used. Please use Write-Error or throw statements in catch blocks. - - - '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. - - - Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. - - - Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. - - - {0}{1} - - - Cannot process null Ast - - - Cannot process null CommandInfo - - - PSDSC - - - Use Standard Get/Set/Test TargetResource functions in DSC Resource - - - DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. - - - Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. - - - StandardDSCFunctionsInResource - - - Avoid Using Internal URLs - - - Using Internal URLs in the scripts may cause security problems. - - - '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. - - - AvoidUsingInternalURLs - - - www.sharepoint.com - - - Use Identical Parameters For DSC Test and Set Functions - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - UseIdenticalParametersForDSC - - - Missing '{0}' function. DSC Class must implement Get, Set and Test functions. - - - Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions - - - The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. - - - The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). - - - UseIdenticalMandatoryParametersForDSC - - - Not all code path in {0} function in DSC Class {1} returns a value - - - ReturnCorrectTypesForDSCFunctions - - - Return Correct Types For DSC Functions - - - Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. - - - {0} function in DSC Class {1} should return object of type {2} - - - {0} function in DSC Class {1} should return object of type {2} instead of type {3} - - - Set function in DSC Class {0} should not return anything - - - {0} function in DSC Resource should return object of type {1} instead of {2} - - - Set-TargetResource function in DSC Resource should not output anything to the pipeline. - - - Use ShouldProcess For State Changing Functions - - - Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. - - - Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. - - - UseShouldProcessForStateChangingFunctions - - - Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance - - - Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. - - - File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - AvoidUsingWMICmdlet - - - Use OutputType Correctly - - - The return types of a cmdlet should be declared using the OutputType attribute. - - - The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. - - - UseOutputTypeCorrectly - - - DscTestsPresent - - - Dsc tests are present - - - Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. - - - No tests found for resource '{0}' - - - DscExamplesPresent - - - DSC examples are present - - - Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. - - - No examples found for resource '{0}' - - - Avoid Default Value For Mandatory Parameter - - - Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. - - - Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. - - - AvoidDefaultValueForMandatoryParameter - - - Avoid Using Deprecated Manifest Fields - - - "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. - - - AvoidUsingDeprecatedManifestFields - - - Use UTF8 Encoding For Help File - - - PowerShell help file needs to use UTF8 Encoding. - - - File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. - - - UseUTF8EncodingForHelpFile - - - Use BOM encoding for non-ASCII files - - - For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. - - - Missing BOM encoding for non-ASCII encoded file '{0}' - - - UseBOMForUnicodeEncodedFile - - - Script definition has a switch parameter default to true. - - - Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - ScriptDefinition - - - Misleading Backtick - - - Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. - - - MisleadingBacktick - - - This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? - - - Avoid using null or empty HelpMessage parameter attribute. - - - Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. - - - HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. - - - AvoidNullOrEmptyHelpMessageAttribute - - - Use the *ToExport module manifest fields. - - - In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. - - - Do not use wildcard or $null in this field. Explicitly specify a list for {0}. - - - UseToExportFieldsInManifest - - - Replace {0} with {1} - - - Set {0} type to SecureString - - - Add {0} = {1} to the module manifest - - - Replace {0} with {1} - - - Create hashtables with literal initializers - - - Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default - - - Create hashtables with literal initliazers - - - UseLiteralInitializerForHashtable - - - UseCompatibleCmdlets - - - Use compatible cmdlets - - - Use cmdlets compatible with the given PowerShell version and edition and operating system - - - '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' - - - UseCompatibleCommands - - - Use compatible commands - - - Use commands compatible with the given PowerShell version and operating system - - - The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleTypes - - - Use compatible types - - - Use types compatible with the given PowerShell version and operating system - - - The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleSyntax - - - Use compatible syntax - - - Use script syntax compatible with the given PowerShell versions - - - The {0} syntax '{1}' is not available by default in PowerShell versions {2} - - - Use the '{0}' syntax instead for compatibility with PowerShell versions {1} - - - The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - Avoid global functiosn and aliases - - - Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. - - - Avoid creating functions with a Global scope. - - - AvoidGlobalFunctions - - - Avoid global aliases. - - - Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. - - - Avoid creating aliases with a Global scope. - - - AvoidGlobalAliases - - - AvoidTrailingWhitespace - - - Avoid trailing whitespace - - - Each line should have no trailing whitespace. - - - Line has trailing whitespace - - - AvoidLongLines - - - Avoid long lines - - - Line lengths should be less than the configured maximum - - - Line exceeds the configured maximum length of {0} characters - - - PlaceOpenBrace - - - Place open braces consistently - - - Place open braces either on the same line as the preceding expression or on a new line. - - - Open brace not on same line as preceding keyword. It should be on the same line. - - - Open brace is not on a new line. - - - There is no new line after open brace. - - - PlaceCloseBrace - - - Place close braces - - - Close brace should be on a new line by itself. - - - Close brace is not on a new line. - - - Close brace does not follow a non-empty line. - - - Close brace does not follow a new line. - - - Close brace before a branch statement is followed by a new line. - - - UseConsistentIndentation - - - Use consistent indentation - - - Each statement block should have a consistent indenation. - - - Indentation not consistent - - - UseConsistentWhitespace - - - Use whitespaces - - - Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') - - - Use space before open brace. - - - Use space before open parenthesis. - - - Use space before and after binary and assignment operators. - - - Use space after a comma. - - - Use space after a semicolon. - - - UseSupportsShouldProcess - - - Use SupportsShouldProcess - - - Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. - - - Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. - - - AlignAssignmentStatement - - - Align assignment statement - - - Line up assignment statements such that the assignment operator are aligned. - - - Assignment statements are not aligned - - - '=' is not an assignment operator. Did you mean the equality operator '-eq'? - - - PossibleIncorrectUsageOfAssignmentOperator - - - Use a different variable name - - - Changing automtic variables might have undesired side effects - - - This automatic variables is built into PowerShell and readonly. - - - The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - AvoidAssignmentToAutomaticVariable - - - Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. - - - '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. - - - Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. - - - '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). - - - When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. - - - Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). - - - PossibleIncorrectUsageOfRedirectionOperator - - - Use $null on the left hand side for safe comparison with $null. - - - Use space after open brace. - - - Use space before closing brace. - - - Use space after pipe. - - - Use space before pipe. - - - Use exact casing of cmdlet/function name. - - - For better readability and consistency, use the exact casing of the cmdlet/function. - - - Cmdlet/Function does not match its exact casing '{0}'. - - - UseCorrectCasing - - - Use process block for pipeline commands - - - If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. - - - Commands that support pipeline input should return output in a process block. - - - UseProcessBlockForPipelineCommands - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. + + + Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. + + + Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. + + + Avoid Using Empty Catch Block + + + The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. + + + Avoid Using Invoke-Expression + + + Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. + + + Avoid Using Positional Parameters + + + Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. + + + The cmdlet '{0}' does not have a help comment. + + + Basic Comment Help + + + Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. + + + The cmdlet '{0}' uses an unapproved verb. + + + Cmdlet Verbs + + + Ensure declared variables are used elsewhere in the script and not just during assignment. + + + The variable '{0}' is assigned but never used. + + + Extra Variables + + + Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. + + + Found global variable '{0}'. + + + No Global Variables + + + Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. + + + $null should be on the left side of equality comparisons. + + + Null Comparison + + + Checks that cmdlets and parameters have more than one character. + + + The cmdlet name '{0}' only has one character. + + + The cmdlet '{0}' has a parameter '{1}' that only has one character. + + + A script block has a parameter '{0}' that only has one character. + + + One Char + + + For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. + + + The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + Use PSCredential type. + + + Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. + + + The cmdlet '{0}' uses a reserved char in its name. + + + Reserved Cmdlet Chars + + + The cmdlet '{0}' + + + Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. + + + '{0}' defines the reserved common parameter '{1}'. + + + Reserved Parameters + + + The script + + + #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ + + + Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. + + + '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + Should Process + + + PS + + + It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. + + + There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. + + + Use verbose message in DSC resource + + + Some fields of the module manifest (such as ModuleVersion) are required. + + + Module Manifest Fields + + + If a script file is in a PowerShell module folder, then that folder must be loadable. + + + Cannot load the module '{0}' that file '{1}' is in. + + + Module Must Be Loadable + + + Error Message is Null. + + + Password parameters that take in plaintext will expose passwords and compromise the security of your system. + + + Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. + + + Avoid Using Plain Text For Password Parameter + + + Using ConvertTo-SecureString with plain text will expose secure information. + + + File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Avoid Using SecureString With Plain Text + + + Switch parameter should not default to true. + + + File '{0}' has a switch parameter default to true. + + + Switch Parameters Should Not Default To True + + + Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. + + + Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Avoid Using ShouldContinue Without Boolean Force Parameter + + + Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. + + + File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. + + + Avoid Using Clear-Host + + + File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. + + + Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. + + + File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + Avoid Using Write-Host + + + Cmdlet should use singular instead of plural nouns. + + + The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. + + + Cmdlet Singular Noun + + + AvoidUsingCmdletAliases + + + AvoidDefaultValueSwitchParameter + + + AvoidGlobalVars + + + AvoidShouldContinueWithoutForce + + + AvoidUnloadableModule + + + AvoidUsingClearHost + + + AvoidUsingConvertToSecureStringWithPlainText + + + AvoidUsingEmptyCatchBlock + + + AvoidUsingInvokeExpression + + + AvoidUsingPlainTextForPassword + + + AvoidUsingPositionalParameters + + + AvoidUsingWriteHost + + + OneChar + + + PossibleIncorrectComparisonWithNull + + + ProvideCommentHelp + + + ReservedCmdletChar + + + ReservedParams + + + ShouldProcess + + + UseApprovedVerbs + + + UseDeclaredVarsMoreThanAssignments + + + UsePSCredentialType + + + UseSingularNouns + + + MissingModuleManifestField + + + UseVerboseMessageInDSCResource + + + Command Not Found + + + Commands that are undefined or do not exist should not be used. + + + Command '{0}' Is Not Found + + + CommandNotFound + + + Type Not Found + + + Undefined type should not be used + + + Type '{0}' is not found. Please check that it is defined. + + + TypeNotFound + + + Use Cmdlet Correctly + + + Cmdlet should be called with the mandatory parameters. + + + Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. + + + UseCmdletCorrectly + + + Use Type At Variable Assignment + + + Types should be specified at variable assignments to maintain readability and maintainability of script. + + + Specify type at the assignment of variable '{0}' + + + UseTypeAtVariableAssignment + + + Avoid Using Username and Password Parameters + + + Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. + + + Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. + + + AvoidUsingUsernameAndPasswordParams + + + Avoid Invoking Empty Members + + + Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. + + + '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. + + + AvoidInvokingEmptyMembers + + + Avoid Using ComputerName Hardcoded + + + The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. + + + The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. + + + AvoidUsingComputerNameHardcoded + + + Empty catch block is used. Please use Write-Error or throw statements in catch blocks. + + + '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. + + + Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. + + + Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. + + + {0}{1} + + + Cannot process null Ast + + + Cannot process null CommandInfo + + + PSDSC + + + Use Standard Get/Set/Test TargetResource functions in DSC Resource + + + DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. + + + Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. + + + StandardDSCFunctionsInResource + + + Avoid Using Internal URLs + + + Using Internal URLs in the scripts may cause security problems. + + + '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. + + + AvoidUsingInternalURLs + + + www.sharepoint.com + + + Use Identical Parameters For DSC Test and Set Functions + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + UseIdenticalParametersForDSC + + + Missing '{0}' function. DSC Class must implement Get, Set and Test functions. + + + Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions + + + The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. + + + The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). + + + UseIdenticalMandatoryParametersForDSC + + + Not all code path in {0} function in DSC Class {1} returns a value + + + ReturnCorrectTypesForDSCFunctions + + + Return Correct Types For DSC Functions + + + Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. + + + {0} function in DSC Class {1} should return object of type {2} + + + {0} function in DSC Class {1} should return object of type {2} instead of type {3} + + + Set function in DSC Class {0} should not return anything + + + {0} function in DSC Resource should return object of type {1} instead of {2} + + + Set-TargetResource function in DSC Resource should not output anything to the pipeline. + + + Use ShouldProcess For State Changing Functions + + + Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. + + + Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. + + + UseShouldProcessForStateChangingFunctions + + + Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance + + + Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. + + + File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + AvoidUsingWMICmdlet + + + Use OutputType Correctly + + + The return types of a cmdlet should be declared using the OutputType attribute. + + + The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. + + + UseOutputTypeCorrectly + + + DscTestsPresent + + + Dsc tests are present + + + Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. + + + No tests found for resource '{0}' + + + DscExamplesPresent + + + DSC examples are present + + + Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. + + + No examples found for resource '{0}' + + + Avoid Default Value For Mandatory Parameter + + + Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. + + + Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. + + + AvoidDefaultValueForMandatoryParameter + + + Avoid Using Deprecated Manifest Fields + + + "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. + + + AvoidUsingDeprecatedManifestFields + + + Use UTF8 Encoding For Help File + + + PowerShell help file needs to use UTF8 Encoding. + + + File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. + + + UseUTF8EncodingForHelpFile + + + Use BOM encoding for non-ASCII files + + + For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. + + + Missing BOM encoding for non-ASCII encoded file '{0}' + + + UseBOMForUnicodeEncodedFile + + + Script definition has a switch parameter default to true. + + + Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + ScriptDefinition + + + Misleading Backtick + + + Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. + + + MisleadingBacktick + + + This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? + + + Avoid using null or empty HelpMessage parameter attribute. + + + Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. + + + HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. + + + AvoidNullOrEmptyHelpMessageAttribute + + + Use the *ToExport module manifest fields. + + + In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. + + + Do not use wildcard or $null in this field. Explicitly specify a list for {0}. + + + UseToExportFieldsInManifest + + + Replace {0} with {1} + + + Set {0} type to SecureString + + + Add {0} = {1} to the module manifest + + + Replace {0} with {1} + + + Create hashtables with literal initializers + + + Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default + + + Create hashtables with literal initliazers + + + UseLiteralInitializerForHashtable + + + UseCompatibleCmdlets + + + Use compatible cmdlets + + + Use cmdlets compatible with the given PowerShell version and edition and operating system + + + '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' + + + UseCompatibleCommands + + + Use compatible commands + + + Use commands compatible with the given PowerShell version and operating system + + + The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleTypes + + + Use compatible types + + + Use types compatible with the given PowerShell version and operating system + + + The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleSyntax + + + Use compatible syntax + + + Use script syntax compatible with the given PowerShell versions + + + The {0} syntax '{1}' is not available by default in PowerShell versions {2} + + + Use the '{0}' syntax instead for compatibility with PowerShell versions {1} + + + The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + Avoid global functiosn and aliases + + + Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. + + + Avoid creating functions with a Global scope. + + + AvoidGlobalFunctions + + + Avoid global aliases. + + + Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. + + + Avoid creating aliases with a Global scope. + + + AvoidGlobalAliases + + + AvoidTrailingWhitespace + + + Avoid trailing whitespace + + + Each line should have no trailing whitespace. + + + Line has trailing whitespace + + + AvoidLongLines + + + Avoid long lines + + + Line lengths should be less than the configured maximum + + + Line exceeds the configured maximum length of {0} characters + + + PlaceOpenBrace + + + Place open braces consistently + + + Place open braces either on the same line as the preceding expression or on a new line. + + + Open brace not on same line as preceding keyword. It should be on the same line. + + + Open brace is not on a new line. + + + There is no new line after open brace. + + + PlaceCloseBrace + + + Place close braces + + + Close brace should be on a new line by itself. + + + Close brace is not on a new line. + + + Close brace does not follow a non-empty line. + + + Close brace does not follow a new line. + + + Close brace before a branch statement is followed by a new line. + + + UseConsistentIndentation + + + Use consistent indentation + + + Each statement block should have a consistent indenation. + + + Indentation not consistent + + + UseConsistentWhitespace + + + Use whitespaces + + + Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') + + + Use space before open brace. + + + Use space before open parenthesis. + + + Use space before and after binary and assignment operators. + + + Use space after a comma. + + + Use space after a semicolon. + + + UseSupportsShouldProcess + + + Use SupportsShouldProcess + + + Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. + + + Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. + + + AlignAssignmentStatement + + + Align assignment statement + + + Line up assignment statements such that the assignment operator are aligned. + + + Assignment statements are not aligned + + + '=' is not an assignment operator. Did you mean the equality operator '-eq'? + + + PossibleIncorrectUsageOfAssignmentOperator + + + Use a different variable name + + + Changing automtic variables might have undesired side effects + + + This automatic variables is built into PowerShell and readonly. + + + The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + AvoidAssignmentToAutomaticVariable + + + Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. + + + '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. + + + Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. + + + '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). + + + When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. + + + Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). + + + PossibleIncorrectUsageOfRedirectionOperator + + + Use $null on the left hand side for safe comparison with $null. + + + Use space after open brace. + + + Use space before closing brace. + + + Use space after pipe. + + + Use space before pipe. + + + Use exact casing of cmdlet/function name. + + + For better readability and consistency, use the exact casing of the cmdlet/function. + + + Cmdlet/Function does not match its exact casing '{0}'. + + + UseCorrectCasing + + + Use process block for pipeline commands. + + + If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + + + Commands that support pipeline input should return output in a process block. + + + UseProcessBlockForPipelineCommands + \ No newline at end of file From dd428297d55f7256d4350133d64161b2679ced68 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sat, 16 Nov 2019 13:58:20 -0500 Subject: [PATCH 05/23] refactor UseProcessBlockForPipelineCommands rule --- Rules/UseProcessBlockForPipelineCommands.cs | 56 +++++++++------------ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/Rules/UseProcessBlockForPipelineCommands.cs b/Rules/UseProcessBlockForPipelineCommands.cs index e11499202..eda924238 100644 --- a/Rules/UseProcessBlockForPipelineCommands.cs +++ b/Rules/UseProcessBlockForPipelineCommands.cs @@ -24,44 +24,36 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) { if ( - funcAst.Body != null - && funcAst.Body.ParamBlock != null - && funcAst.Body.ParamBlock.Attributes != null - && funcAst.Body.ParamBlock.Parameters != null - && funcAst.Body.ProcessBlock == null + funcAst.Body.ParamBlock == null + || funcAst.Body.ParamBlock.Attributes == null + || funcAst.Body.ParamBlock.Parameters == null + || funcAst.Body.ProcessBlock != null ) + { continue; } + + foreach (var paramAst in funcAst.Body.ParamBlock.Parameters) { - foreach (var paramAst in funcAst.Body.ParamBlock.Parameters) + foreach (var paramAstAttribute in paramAst.Attributes) { - foreach (var paramAstAttribute in paramAst.Attributes) + foreach (NamedAttributeArgumentAst namedArgument in (paramAstAttribute as AttributeAst).NamedArguments) { - if (paramAstAttribute is AttributeAst) - { - var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; - if (namedArguments != null) - { - foreach (NamedAttributeArgumentAst namedArgument in namedArguments) - { - if - ( - String.Equals(namedArgument.ArgumentName, "valuefrompipeline", StringComparison.OrdinalIgnoreCase) - || String.Equals(namedArgument.ArgumentName, "valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) - ) - { - yield return new DiagnosticRecord( - string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), - paramAst.Name.Extent, - GetName(), - DiagnosticSeverity.Warning, - fileName, - paramAst.Name.VariablePath.UserPath - ); - } - } - } - } + if + ( + !String.Equals(namedArgument.ArgumentName, "valuefrompipeline", StringComparison.OrdinalIgnoreCase) + && !String.Equals(namedArgument.ArgumentName, "valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) + ) + { continue; } } } + + yield return new DiagnosticRecord( + string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), + paramAst.Name.Extent, + GetName(), + DiagnosticSeverity.Warning, + fileName, + paramAst.Name.VariablePath.UserPath + ); } } } From 32916c2d8f431497b30bfd483cdb0dea53db18af Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sat, 16 Nov 2019 13:58:49 -0500 Subject: [PATCH 06/23] add tests and docs for UseProcessBlockForPipelineCommands rule --- .../UseProcessBlockForPipelineCommands.md | 62 +++++++++++++++++++ ...eProcessBlockForPipelineCommands.tests.ps1 | 33 ++++++++++ 2 files changed, 95 insertions(+) create mode 100644 RuleDocumentation/UseProcessBlockForPipelineCommands.md create mode 100644 Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 diff --git a/RuleDocumentation/UseProcessBlockForPipelineCommands.md b/RuleDocumentation/UseProcessBlockForPipelineCommands.md new file mode 100644 index 000000000..f105a4c38 --- /dev/null +++ b/RuleDocumentation/UseProcessBlockForPipelineCommands.md @@ -0,0 +1,62 @@ +# UseProcessBlockForPipelineCommands + +**Severity Level: Warning** + +## Description + +Functions that support pipeline input should always handle parameter input in a process block. Unexpected behavior can result if input is handled directly in the body of a function where parameters declare pipeline support. + +## Example + +### Wrong + +``` PowerShell +Function Get-Number +{ + [CmdletBinding()] + Param( + [Parameter(ValueFromPipeline)] + [int] + $Number + ) + + $Number +} +``` + +#### Result + +``` +PS C:\> 1..5 | Broken +5 +``` + +### Correct + +``` PowerShell +Function Get-Number +{ + [CmdletBinding()] + Param( + [Parameter(ValueFromPipeline)] + [int] + $Number + ) + + process + { + $Number + } +} +``` + +#### Result + +``` +PS C:\> 1..5 | Correct +1 +2 +3 +4 +5 +``` diff --git a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 new file mode 100644 index 000000000..3b7a924fa --- /dev/null +++ b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 @@ -0,0 +1,33 @@ +Describe "UseProcessBlockForPipelineCommands" { + BeforeAll { + $RuleName = 'PSUseProcessBlockForPipelineCommands' + $WithoutProcessBlock = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' + $WithoutProcessBlockByPropertyName = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' + $WithProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' + $WithProcessBlockByPropertyName = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' + } + + Context "When there are violations" { + $Cases = @( + @{ScriptDefinition = $WithoutProcessBlock} + @{ScriptDefinition = $WithoutProcessBlockByPropertyName} + ) + It "has 1 violation for function " { + param ($ScriptDefinition) + + Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should Not BeNullOrEmpty + } -TestCases $Cases + } + + Context "When there are no violations" { + $Cases = @( + @{ScriptDefinition = $WithProcessBlock } + @{ScriptDefinition = $WithProcessBlockByPropertyName } + ) + It "has no violations for function " { + param ($ScriptDefinition) + + Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should BeNullOrEmpty + } -TestCases $Cases + } +} From fe2c8e78f22c5674443d11265445bd1826fb1ef1 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sat, 16 Nov 2019 19:34:39 -0500 Subject: [PATCH 07/23] Fix logic non-pipeline function and add test case --- Rules/UseProcessBlockForPipelineCommands.cs | 25 +++++++++++-------- ...eProcessBlockForPipelineCommands.tests.ps1 | 22 ++++++++-------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/Rules/UseProcessBlockForPipelineCommands.cs b/Rules/UseProcessBlockForPipelineCommands.cs index eda924238..4a708ad90 100644 --- a/Rules/UseProcessBlockForPipelineCommands.cs +++ b/Rules/UseProcessBlockForPipelineCommands.cs @@ -30,12 +30,15 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) || funcAst.Body.ProcessBlock != null ) { continue; } - + foreach (var paramAst in funcAst.Body.ParamBlock.Parameters) { foreach (var paramAstAttribute in paramAst.Attributes) { - foreach (NamedAttributeArgumentAst namedArgument in (paramAstAttribute as AttributeAst).NamedArguments) + var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; + if (namedArguments == null) { continue; } + + foreach (NamedAttributeArgumentAst namedArgument in namedArguments) { if ( @@ -43,17 +46,17 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) && !String.Equals(namedArgument.ArgumentName, "valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) ) { continue; } + + yield return new DiagnosticRecord( + string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), + paramAst.Name.Extent, + GetName(), + DiagnosticSeverity.Warning, + fileName, + paramAst.Name.VariablePath.UserPath + ); } } - - yield return new DiagnosticRecord( - string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), - paramAst.Name.Extent, - GetName(), - DiagnosticSeverity.Warning, - fileName, - paramAst.Name.VariablePath.UserPath - ); } } } diff --git a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 index 3b7a924fa..df968195c 100644 --- a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 +++ b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 @@ -1,18 +1,19 @@ Describe "UseProcessBlockForPipelineCommands" { BeforeAll { $RuleName = 'PSUseProcessBlockForPipelineCommands' - $WithoutProcessBlock = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' - $WithoutProcessBlockByPropertyName = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' - $WithProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' - $WithProcessBlockByPropertyName = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' + $NoProcessBlock = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' + $NoProcessBlockByPropertyName = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' + $HasProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' + $HasProcessBlockByPropertyName = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' + $NoAttribute = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()]$Param1) }' } Context "When there are violations" { $Cases = @( - @{ScriptDefinition = $WithoutProcessBlock} - @{ScriptDefinition = $WithoutProcessBlockByPropertyName} + @{ScriptDefinition = $NoProcessBlock; Name = "NoProcessBlock"} + @{ScriptDefinition = $NoProcessBlockByPropertyName; Name = "NoProcessBlockByPropertyName"} ) - It "has 1 violation for function " { + It "has 1 violation for function " { param ($ScriptDefinition) Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should Not BeNullOrEmpty @@ -21,10 +22,11 @@ Context "When there are no violations" { $Cases = @( - @{ScriptDefinition = $WithProcessBlock } - @{ScriptDefinition = $WithProcessBlockByPropertyName } + @{ScriptDefinition = $HasProcessBlock; Name = "HasProcessBlock" } + @{ScriptDefinition = $HasProcessBlockByPropertyName; Name = "HasProcessBlockByPropertyName" } + @{ScriptDefinition = $NoAttribute; Name = "NoAttribute" } ) - It "has no violations for function " { + It "has no violations for function " { param ($ScriptDefinition) Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should BeNullOrEmpty From 585a73527f8cd9c9492f72ce2982677cff7f4441 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sat, 16 Nov 2019 22:11:40 -0500 Subject: [PATCH 08/23] fixing some test failures --- RuleDocumentation/README.md | 1 + Rules/UseProcessBlockForPipelineCommands.cs | 2 ++ Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 | 2 ++ 3 files changed, 5 insertions(+) diff --git a/RuleDocumentation/README.md b/RuleDocumentation/README.md index e9d3f66ce..1fa56501a 100644 --- a/RuleDocumentation/README.md +++ b/RuleDocumentation/README.md @@ -50,6 +50,7 @@ |[UseDeclaredVarsMoreThanAssignments](./UseDeclaredVarsMoreThanAssignments.md) | Warning | | |[UseLiteralInitializerForHashtable](./UseLiteralInitializerForHashtable.md) | Warning | | |[UseOutputTypeCorrectly](./UseOutputTypeCorrectly.md) | Information | | +|[UseProcessBlockForPipelineCommands](./UseProcessBlockForPipelineCommands.md) | Warning | | |[UsePSCredentialType](./UsePSCredentialType.md) | Warning | | |[UseShouldProcessForStateChangingFunctions](./UseShouldProcessForStateChangingFunctions.md) | Warning | | |[UseSingularNouns*](./UseSingularNouns.md) | Warning | | diff --git a/Rules/UseProcessBlockForPipelineCommands.cs b/Rules/UseProcessBlockForPipelineCommands.cs index 4a708ad90..c3688379b 100644 --- a/Rules/UseProcessBlockForPipelineCommands.cs +++ b/Rules/UseProcessBlockForPipelineCommands.cs @@ -35,6 +35,8 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) { foreach (var paramAstAttribute in paramAst.Attributes) { + if (!(paramAstAttribute is AttributeAst)) { continue; } + var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; if (namedArguments == null) { continue; } diff --git a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 index df968195c..6a0f13ce1 100644 --- a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 +++ b/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 @@ -6,6 +6,7 @@ $HasProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' $HasProcessBlockByPropertyName = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' $NoAttribute = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()]$Param1) }' + $HasTypeDeclaration = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()][string]$Param1) }' } Context "When there are violations" { @@ -25,6 +26,7 @@ @{ScriptDefinition = $HasProcessBlock; Name = "HasProcessBlock" } @{ScriptDefinition = $HasProcessBlockByPropertyName; Name = "HasProcessBlockByPropertyName" } @{ScriptDefinition = $NoAttribute; Name = "NoAttribute" } + @{ScriptDefinition = $HasTypeDeclaration; Name = "HasTypeDeclaration"} ) It "has no violations for function " { param ($ScriptDefinition) From b499d9eacb7718961297377d981a5ea16ee18a3d Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Sun, 17 Nov 2019 13:26:39 -0500 Subject: [PATCH 09/23] incrememt number of expected rules --- Tests/Engine/GetScriptAnalyzerRule.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Engine/GetScriptAnalyzerRule.tests.ps1 b/Tests/Engine/GetScriptAnalyzerRule.tests.ps1 index 8b68c63f3..25d2bcc69 100644 --- a/Tests/Engine/GetScriptAnalyzerRule.tests.ps1 +++ b/Tests/Engine/GetScriptAnalyzerRule.tests.ps1 @@ -59,7 +59,7 @@ Describe "Test Name parameters" { It "get Rules with no parameters supplied" { $defaultRules = Get-ScriptAnalyzerRule - $expectedNumRules = 60 + $expectedNumRules = 61 if ((Test-PSEditionCoreClr) -or (Test-PSVersionV3) -or (Test-PSVersionV4)) { # for PSv3 PSAvoidGlobalAliases is not shipped because From 2df5e700a9ba117eed937ff6a715d5f177bd547a Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Tue, 19 Nov 2019 08:36:42 -0500 Subject: [PATCH 10/23] fix style suggestions for PR #1373 --- ...d => UseProcessBlockForPipelineCommand.md} | 6 +- Rules/Strings.Designer.cs | 20 +- Rules/Strings.resx | 2188 ++++++++--------- ...s => UseProcessBlockForPipelineCommand.cs} | 16 +- ...eProcessBlockForPipelineCommand.tests.ps1} | 8 +- 5 files changed, 1119 insertions(+), 1119 deletions(-) rename RuleDocumentation/{UseProcessBlockForPipelineCommands.md => UseProcessBlockForPipelineCommand.md} (88%) rename Rules/{UseProcessBlockForPipelineCommands.cs => UseProcessBlockForPipelineCommand.cs} (81%) rename Tests/Rules/{UseProcessBlockForPipelineCommands.tests.ps1 => UseProcessBlockForPipelineCommand.tests.ps1} (89%) diff --git a/RuleDocumentation/UseProcessBlockForPipelineCommands.md b/RuleDocumentation/UseProcessBlockForPipelineCommand.md similarity index 88% rename from RuleDocumentation/UseProcessBlockForPipelineCommands.md rename to RuleDocumentation/UseProcessBlockForPipelineCommand.md index f105a4c38..d66dc6f72 100644 --- a/RuleDocumentation/UseProcessBlockForPipelineCommands.md +++ b/RuleDocumentation/UseProcessBlockForPipelineCommand.md @@ -1,4 +1,4 @@ -# UseProcessBlockForPipelineCommands +# UseProcessBlockForPipelineCommand **Severity Level: Warning** @@ -27,7 +27,7 @@ Function Get-Number #### Result ``` -PS C:\> 1..5 | Broken +PS C:\> 1..5 | Get-Number 5 ``` @@ -53,7 +53,7 @@ Function Get-Number #### Result ``` -PS C:\> 1..5 | Correct +PS C:\> 1..5 | Get-Number 1 2 3 diff --git a/Rules/Strings.Designer.cs b/Rules/Strings.Designer.cs index 8587b4cde..c91206664 100644 --- a/Rules/Strings.Designer.cs +++ b/Rules/Strings.Designer.cs @@ -2599,38 +2599,38 @@ internal static string UseOutputTypeCorrectlyName { } /// - /// Looks up a localized string similar to Use process block for pipeline commands. + /// Looks up a localized string similar to Use process block for pipeline commands.. /// - internal static string UseProcessBlockForPipelineCommandsCommonName { + internal static string UseProcessBlockForPipelineCommandCommonName { get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsCommonName", resourceCulture); + return ResourceManager.GetString("UseProcessBlockForPipelineCommandCommonName", resourceCulture); } } /// /// Looks up a localized string similar to If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features.. /// - internal static string UseProcessBlockForPipelineCommandsDescription { + internal static string UseProcessBlockForPipelineCommandDescription { get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsDescription", resourceCulture); + return ResourceManager.GetString("UseProcessBlockForPipelineCommandDescription", resourceCulture); } } /// /// Looks up a localized string similar to Commands that support pipeline input should return output in a process block.. /// - internal static string UseProcessBlockForPipelineCommandsError { + internal static string UseProcessBlockForPipelineCommandError { get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsError", resourceCulture); + return ResourceManager.GetString("UseProcessBlockForPipelineCommandError", resourceCulture); } } /// - /// Looks up a localized string similar to UseProcessBlockForPipelineCommands. + /// Looks up a localized string similar to UseProcessBlockForPipelineCommand. /// - internal static string UseProcessBlockForPipelineCommandsName { + internal static string UseProcessBlockForPipelineCommandName { get { - return ResourceManager.GetString("UseProcessBlockForPipelineCommandsName", resourceCulture); + return ResourceManager.GetString("UseProcessBlockForPipelineCommandName", resourceCulture); } } diff --git a/Rules/Strings.resx b/Rules/Strings.resx index e52c95907..b7b1904d9 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1,1095 +1,1095 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. - - - Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. - - - Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. - - - Avoid Using Empty Catch Block - - - The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. - - - Avoid Using Invoke-Expression - - - Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. - - - Avoid Using Positional Parameters - - - Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. - - - The cmdlet '{0}' does not have a help comment. - - - Basic Comment Help - - - Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. - - - The cmdlet '{0}' uses an unapproved verb. - - - Cmdlet Verbs - - - Ensure declared variables are used elsewhere in the script and not just during assignment. - - - The variable '{0}' is assigned but never used. - - - Extra Variables - - - Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. - - - Found global variable '{0}'. - - - No Global Variables - - - Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. - - - $null should be on the left side of equality comparisons. - - - Null Comparison - - - Checks that cmdlets and parameters have more than one character. - - - The cmdlet name '{0}' only has one character. - - - The cmdlet '{0}' has a parameter '{1}' that only has one character. - - - A script block has a parameter '{0}' that only has one character. - - - One Char - - - For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. - - - The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - Use PSCredential type. - - - Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. - - - The cmdlet '{0}' uses a reserved char in its name. - - - Reserved Cmdlet Chars - - - The cmdlet '{0}' - - - Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. - - - '{0}' defines the reserved common parameter '{1}'. - - - Reserved Parameters - - - The script - - - #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ - - - Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. - - - '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - Should Process - - - PS - - - It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. - - - There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. - - - Use verbose message in DSC resource - - - Some fields of the module manifest (such as ModuleVersion) are required. - - - Module Manifest Fields - - - If a script file is in a PowerShell module folder, then that folder must be loadable. - - - Cannot load the module '{0}' that file '{1}' is in. - - - Module Must Be Loadable - - - Error Message is Null. - - - Password parameters that take in plaintext will expose passwords and compromise the security of your system. - - - Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. - - - Avoid Using Plain Text For Password Parameter - - - Using ConvertTo-SecureString with plain text will expose secure information. - - - File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Avoid Using SecureString With Plain Text - - - Switch parameter should not default to true. - - - File '{0}' has a switch parameter default to true. - - - Switch Parameters Should Not Default To True - - - Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. - - - Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Avoid Using ShouldContinue Without Boolean Force Parameter - - - Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. - - - File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. - - - Avoid Using Clear-Host - - - File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - - - Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - - - File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - Avoid Using Write-Host - - - Cmdlet should use singular instead of plural nouns. - - - The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. - - - Cmdlet Singular Noun - - - AvoidUsingCmdletAliases - - - AvoidDefaultValueSwitchParameter - - - AvoidGlobalVars - - - AvoidShouldContinueWithoutForce - - - AvoidUnloadableModule - - - AvoidUsingClearHost - - - AvoidUsingConvertToSecureStringWithPlainText - - - AvoidUsingEmptyCatchBlock - - - AvoidUsingInvokeExpression - - - AvoidUsingPlainTextForPassword - - - AvoidUsingPositionalParameters - - - AvoidUsingWriteHost - - - OneChar - - - PossibleIncorrectComparisonWithNull - - - ProvideCommentHelp - - - ReservedCmdletChar - - - ReservedParams - - - ShouldProcess - - - UseApprovedVerbs - - - UseDeclaredVarsMoreThanAssignments - - - UsePSCredentialType - - - UseSingularNouns - - - MissingModuleManifestField - - - UseVerboseMessageInDSCResource - - - Command Not Found - - - Commands that are undefined or do not exist should not be used. - - - Command '{0}' Is Not Found - - - CommandNotFound - - - Type Not Found - - - Undefined type should not be used - - - Type '{0}' is not found. Please check that it is defined. - - - TypeNotFound - - - Use Cmdlet Correctly - - - Cmdlet should be called with the mandatory parameters. - - - Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. - - - UseCmdletCorrectly - - - Use Type At Variable Assignment - - - Types should be specified at variable assignments to maintain readability and maintainability of script. - - - Specify type at the assignment of variable '{0}' - - - UseTypeAtVariableAssignment - - - Avoid Using Username and Password Parameters - - - Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. - - - Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. - - - AvoidUsingUsernameAndPasswordParams - - - Avoid Invoking Empty Members - - - Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. - - - '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. - - - AvoidInvokingEmptyMembers - - - Avoid Using ComputerName Hardcoded - - - The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. - - - The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. - - - AvoidUsingComputerNameHardcoded - - - Empty catch block is used. Please use Write-Error or throw statements in catch blocks. - - - '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. - - - Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. - - - Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. - - - {0}{1} - - - Cannot process null Ast - - - Cannot process null CommandInfo - - - PSDSC - - - Use Standard Get/Set/Test TargetResource functions in DSC Resource - - - DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. - - - Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. - - - StandardDSCFunctionsInResource - - - Avoid Using Internal URLs - - - Using Internal URLs in the scripts may cause security problems. - - - '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. - - - AvoidUsingInternalURLs - - - www.sharepoint.com - - - Use Identical Parameters For DSC Test and Set Functions - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - UseIdenticalParametersForDSC - - - Missing '{0}' function. DSC Class must implement Get, Set and Test functions. - - - Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions - - - The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. - - - The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). - - - UseIdenticalMandatoryParametersForDSC - - - Not all code path in {0} function in DSC Class {1} returns a value - - - ReturnCorrectTypesForDSCFunctions - - - Return Correct Types For DSC Functions - - - Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. - - - {0} function in DSC Class {1} should return object of type {2} - - - {0} function in DSC Class {1} should return object of type {2} instead of type {3} - - - Set function in DSC Class {0} should not return anything - - - {0} function in DSC Resource should return object of type {1} instead of {2} - - - Set-TargetResource function in DSC Resource should not output anything to the pipeline. - - - Use ShouldProcess For State Changing Functions - - - Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. - - - Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. - - - UseShouldProcessForStateChangingFunctions - - - Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance - - - Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. - - - File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - AvoidUsingWMICmdlet - - - Use OutputType Correctly - - - The return types of a cmdlet should be declared using the OutputType attribute. - - - The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. - - - UseOutputTypeCorrectly - - - DscTestsPresent - - - Dsc tests are present - - - Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. - - - No tests found for resource '{0}' - - - DscExamplesPresent - - - DSC examples are present - - - Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. - - - No examples found for resource '{0}' - - - Avoid Default Value For Mandatory Parameter - - - Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. - - - Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. - - - AvoidDefaultValueForMandatoryParameter - - - Avoid Using Deprecated Manifest Fields - - - "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. - - - AvoidUsingDeprecatedManifestFields - - - Use UTF8 Encoding For Help File - - - PowerShell help file needs to use UTF8 Encoding. - - - File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. - - - UseUTF8EncodingForHelpFile - - - Use BOM encoding for non-ASCII files - - - For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. - - - Missing BOM encoding for non-ASCII encoded file '{0}' - - - UseBOMForUnicodeEncodedFile - - - Script definition has a switch parameter default to true. - - - Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - ScriptDefinition - - - Misleading Backtick - - - Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. - - - MisleadingBacktick - - - This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? - - - Avoid using null or empty HelpMessage parameter attribute. - - - Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. - - - HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. - - - AvoidNullOrEmptyHelpMessageAttribute - - - Use the *ToExport module manifest fields. - - - In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. - - - Do not use wildcard or $null in this field. Explicitly specify a list for {0}. - - - UseToExportFieldsInManifest - - - Replace {0} with {1} - - - Set {0} type to SecureString - - - Add {0} = {1} to the module manifest - - - Replace {0} with {1} - - - Create hashtables with literal initializers - - - Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default - - - Create hashtables with literal initliazers - - - UseLiteralInitializerForHashtable - - - UseCompatibleCmdlets - - - Use compatible cmdlets - - - Use cmdlets compatible with the given PowerShell version and edition and operating system - - - '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' - - - UseCompatibleCommands - - - Use compatible commands - - - Use commands compatible with the given PowerShell version and operating system - - - The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleTypes - - - Use compatible types - - - Use types compatible with the given PowerShell version and operating system - - - The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleSyntax - - - Use compatible syntax - - - Use script syntax compatible with the given PowerShell versions - - - The {0} syntax '{1}' is not available by default in PowerShell versions {2} - - - Use the '{0}' syntax instead for compatibility with PowerShell versions {1} - - - The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - Avoid global functiosn and aliases - - - Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. - - - Avoid creating functions with a Global scope. - - - AvoidGlobalFunctions - - - Avoid global aliases. - - - Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. - - - Avoid creating aliases with a Global scope. - - - AvoidGlobalAliases - - - AvoidTrailingWhitespace - - - Avoid trailing whitespace - - - Each line should have no trailing whitespace. - - - Line has trailing whitespace - - - AvoidLongLines - - - Avoid long lines - - - Line lengths should be less than the configured maximum - - - Line exceeds the configured maximum length of {0} characters - - - PlaceOpenBrace - - - Place open braces consistently - - - Place open braces either on the same line as the preceding expression or on a new line. - - - Open brace not on same line as preceding keyword. It should be on the same line. - - - Open brace is not on a new line. - - - There is no new line after open brace. - - - PlaceCloseBrace - - - Place close braces - - - Close brace should be on a new line by itself. - - - Close brace is not on a new line. - - - Close brace does not follow a non-empty line. - - - Close brace does not follow a new line. - - - Close brace before a branch statement is followed by a new line. - - - UseConsistentIndentation - - - Use consistent indentation - - - Each statement block should have a consistent indenation. - - - Indentation not consistent - - - UseConsistentWhitespace - - - Use whitespaces - - - Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') - - - Use space before open brace. - - - Use space before open parenthesis. - - - Use space before and after binary and assignment operators. - - - Use space after a comma. - - - Use space after a semicolon. - - - UseSupportsShouldProcess - - - Use SupportsShouldProcess - - - Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. - - - Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. - - - AlignAssignmentStatement - - - Align assignment statement - - - Line up assignment statements such that the assignment operator are aligned. - - - Assignment statements are not aligned - - - '=' is not an assignment operator. Did you mean the equality operator '-eq'? - - - PossibleIncorrectUsageOfAssignmentOperator - - - Use a different variable name - - - Changing automtic variables might have undesired side effects - - - This automatic variables is built into PowerShell and readonly. - - - The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - AvoidAssignmentToAutomaticVariable - - - Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. - - - '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. - - - Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. - - - '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). - - - When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. - - - Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). - - - PossibleIncorrectUsageOfRedirectionOperator - - - Use $null on the left hand side for safe comparison with $null. - - - Use space after open brace. - - - Use space before closing brace. - - - Use space after pipe. - - - Use space before pipe. - - - Use exact casing of cmdlet/function name. - - - For better readability and consistency, use the exact casing of the cmdlet/function. - - - Cmdlet/Function does not match its exact casing '{0}'. - - - UseCorrectCasing - - - Use process block for pipeline commands. - - - If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. - - - Commands that support pipeline input should return output in a process block. - - - UseProcessBlockForPipelineCommands - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. + + + Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. + + + Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. + + + Avoid Using Empty Catch Block + + + The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. + + + Avoid Using Invoke-Expression + + + Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. + + + Avoid Using Positional Parameters + + + Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. + + + The cmdlet '{0}' does not have a help comment. + + + Basic Comment Help + + + Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. + + + The cmdlet '{0}' uses an unapproved verb. + + + Cmdlet Verbs + + + Ensure declared variables are used elsewhere in the script and not just during assignment. + + + The variable '{0}' is assigned but never used. + + + Extra Variables + + + Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. + + + Found global variable '{0}'. + + + No Global Variables + + + Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. + + + $null should be on the left side of equality comparisons. + + + Null Comparison + + + Checks that cmdlets and parameters have more than one character. + + + The cmdlet name '{0}' only has one character. + + + The cmdlet '{0}' has a parameter '{1}' that only has one character. + + + A script block has a parameter '{0}' that only has one character. + + + One Char + + + For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. + + + The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + Use PSCredential type. + + + Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. + + + The cmdlet '{0}' uses a reserved char in its name. + + + Reserved Cmdlet Chars + + + The cmdlet '{0}' + + + Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. + + + '{0}' defines the reserved common parameter '{1}'. + + + Reserved Parameters + + + The script + + + #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ + + + Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. + + + '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + Should Process + + + PS + + + It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. + + + There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. + + + Use verbose message in DSC resource + + + Some fields of the module manifest (such as ModuleVersion) are required. + + + Module Manifest Fields + + + If a script file is in a PowerShell module folder, then that folder must be loadable. + + + Cannot load the module '{0}' that file '{1}' is in. + + + Module Must Be Loadable + + + Error Message is Null. + + + Password parameters that take in plaintext will expose passwords and compromise the security of your system. + + + Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. + + + Avoid Using Plain Text For Password Parameter + + + Using ConvertTo-SecureString with plain text will expose secure information. + + + File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Avoid Using SecureString With Plain Text + + + Switch parameter should not default to true. + + + File '{0}' has a switch parameter default to true. + + + Switch Parameters Should Not Default To True + + + Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. + + + Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Avoid Using ShouldContinue Without Boolean Force Parameter + + + Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. + + + File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. + + + Avoid Using Clear-Host + + + File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. + + + Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. + + + File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + Avoid Using Write-Host + + + Cmdlet should use singular instead of plural nouns. + + + The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. + + + Cmdlet Singular Noun + + + AvoidUsingCmdletAliases + + + AvoidDefaultValueSwitchParameter + + + AvoidGlobalVars + + + AvoidShouldContinueWithoutForce + + + AvoidUnloadableModule + + + AvoidUsingClearHost + + + AvoidUsingConvertToSecureStringWithPlainText + + + AvoidUsingEmptyCatchBlock + + + AvoidUsingInvokeExpression + + + AvoidUsingPlainTextForPassword + + + AvoidUsingPositionalParameters + + + AvoidUsingWriteHost + + + OneChar + + + PossibleIncorrectComparisonWithNull + + + ProvideCommentHelp + + + ReservedCmdletChar + + + ReservedParams + + + ShouldProcess + + + UseApprovedVerbs + + + UseDeclaredVarsMoreThanAssignments + + + UsePSCredentialType + + + UseSingularNouns + + + MissingModuleManifestField + + + UseVerboseMessageInDSCResource + + + Command Not Found + + + Commands that are undefined or do not exist should not be used. + + + Command '{0}' Is Not Found + + + CommandNotFound + + + Type Not Found + + + Undefined type should not be used + + + Type '{0}' is not found. Please check that it is defined. + + + TypeNotFound + + + Use Cmdlet Correctly + + + Cmdlet should be called with the mandatory parameters. + + + Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. + + + UseCmdletCorrectly + + + Use Type At Variable Assignment + + + Types should be specified at variable assignments to maintain readability and maintainability of script. + + + Specify type at the assignment of variable '{0}' + + + UseTypeAtVariableAssignment + + + Avoid Using Username and Password Parameters + + + Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. + + + Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. + + + AvoidUsingUsernameAndPasswordParams + + + Avoid Invoking Empty Members + + + Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. + + + '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. + + + AvoidInvokingEmptyMembers + + + Avoid Using ComputerName Hardcoded + + + The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. + + + The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. + + + AvoidUsingComputerNameHardcoded + + + Empty catch block is used. Please use Write-Error or throw statements in catch blocks. + + + '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. + + + Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. + + + Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. + + + {0}{1} + + + Cannot process null Ast + + + Cannot process null CommandInfo + + + PSDSC + + + Use Standard Get/Set/Test TargetResource functions in DSC Resource + + + DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. + + + Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. + + + StandardDSCFunctionsInResource + + + Avoid Using Internal URLs + + + Using Internal URLs in the scripts may cause security problems. + + + '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. + + + AvoidUsingInternalURLs + + + www.sharepoint.com + + + Use Identical Parameters For DSC Test and Set Functions + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + UseIdenticalParametersForDSC + + + Missing '{0}' function. DSC Class must implement Get, Set and Test functions. + + + Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions + + + The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. + + + The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). + + + UseIdenticalMandatoryParametersForDSC + + + Not all code path in {0} function in DSC Class {1} returns a value + + + ReturnCorrectTypesForDSCFunctions + + + Return Correct Types For DSC Functions + + + Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. + + + {0} function in DSC Class {1} should return object of type {2} + + + {0} function in DSC Class {1} should return object of type {2} instead of type {3} + + + Set function in DSC Class {0} should not return anything + + + {0} function in DSC Resource should return object of type {1} instead of {2} + + + Set-TargetResource function in DSC Resource should not output anything to the pipeline. + + + Use ShouldProcess For State Changing Functions + + + Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. + + + Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. + + + UseShouldProcessForStateChangingFunctions + + + Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance + + + Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. + + + File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + AvoidUsingWMICmdlet + + + Use OutputType Correctly + + + The return types of a cmdlet should be declared using the OutputType attribute. + + + The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. + + + UseOutputTypeCorrectly + + + DscTestsPresent + + + Dsc tests are present + + + Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. + + + No tests found for resource '{0}' + + + DscExamplesPresent + + + DSC examples are present + + + Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. + + + No examples found for resource '{0}' + + + Avoid Default Value For Mandatory Parameter + + + Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. + + + Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. + + + AvoidDefaultValueForMandatoryParameter + + + Avoid Using Deprecated Manifest Fields + + + "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. + + + AvoidUsingDeprecatedManifestFields + + + Use UTF8 Encoding For Help File + + + PowerShell help file needs to use UTF8 Encoding. + + + File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. + + + UseUTF8EncodingForHelpFile + + + Use BOM encoding for non-ASCII files + + + For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. + + + Missing BOM encoding for non-ASCII encoded file '{0}' + + + UseBOMForUnicodeEncodedFile + + + Script definition has a switch parameter default to true. + + + Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + ScriptDefinition + + + Misleading Backtick + + + Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. + + + MisleadingBacktick + + + This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? + + + Avoid using null or empty HelpMessage parameter attribute. + + + Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. + + + HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. + + + AvoidNullOrEmptyHelpMessageAttribute + + + Use the *ToExport module manifest fields. + + + In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. + + + Do not use wildcard or $null in this field. Explicitly specify a list for {0}. + + + UseToExportFieldsInManifest + + + Replace {0} with {1} + + + Set {0} type to SecureString + + + Add {0} = {1} to the module manifest + + + Replace {0} with {1} + + + Create hashtables with literal initializers + + + Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default + + + Create hashtables with literal initliazers + + + UseLiteralInitializerForHashtable + + + UseCompatibleCmdlets + + + Use compatible cmdlets + + + Use cmdlets compatible with the given PowerShell version and edition and operating system + + + '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' + + + UseCompatibleCommands + + + Use compatible commands + + + Use commands compatible with the given PowerShell version and operating system + + + The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleTypes + + + Use compatible types + + + Use types compatible with the given PowerShell version and operating system + + + The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleSyntax + + + Use compatible syntax + + + Use script syntax compatible with the given PowerShell versions + + + The {0} syntax '{1}' is not available by default in PowerShell versions {2} + + + Use the '{0}' syntax instead for compatibility with PowerShell versions {1} + + + The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + Avoid global functiosn and aliases + + + Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. + + + Avoid creating functions with a Global scope. + + + AvoidGlobalFunctions + + + Avoid global aliases. + + + Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. + + + Avoid creating aliases with a Global scope. + + + AvoidGlobalAliases + + + AvoidTrailingWhitespace + + + Avoid trailing whitespace + + + Each line should have no trailing whitespace. + + + Line has trailing whitespace + + + AvoidLongLines + + + Avoid long lines + + + Line lengths should be less than the configured maximum + + + Line exceeds the configured maximum length of {0} characters + + + PlaceOpenBrace + + + Place open braces consistently + + + Place open braces either on the same line as the preceding expression or on a new line. + + + Open brace not on same line as preceding keyword. It should be on the same line. + + + Open brace is not on a new line. + + + There is no new line after open brace. + + + PlaceCloseBrace + + + Place close braces + + + Close brace should be on a new line by itself. + + + Close brace is not on a new line. + + + Close brace does not follow a non-empty line. + + + Close brace does not follow a new line. + + + Close brace before a branch statement is followed by a new line. + + + UseConsistentIndentation + + + Use consistent indentation + + + Each statement block should have a consistent indenation. + + + Indentation not consistent + + + UseConsistentWhitespace + + + Use whitespaces + + + Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') + + + Use space before open brace. + + + Use space before open parenthesis. + + + Use space before and after binary and assignment operators. + + + Use space after a comma. + + + Use space after a semicolon. + + + UseSupportsShouldProcess + + + Use SupportsShouldProcess + + + Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. + + + Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. + + + AlignAssignmentStatement + + + Align assignment statement + + + Line up assignment statements such that the assignment operator are aligned. + + + Assignment statements are not aligned + + + '=' is not an assignment operator. Did you mean the equality operator '-eq'? + + + PossibleIncorrectUsageOfAssignmentOperator + + + Use a different variable name + + + Changing automtic variables might have undesired side effects + + + This automatic variables is built into PowerShell and readonly. + + + The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + AvoidAssignmentToAutomaticVariable + + + Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. + + + '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. + + + Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. + + + '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). + + + When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. + + + Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). + + + PossibleIncorrectUsageOfRedirectionOperator + + + Use $null on the left hand side for safe comparison with $null. + + + Use space after open brace. + + + Use space before closing brace. + + + Use space after pipe. + + + Use space before pipe. + + + Use exact casing of cmdlet/function name. + + + For better readability and consistency, use the exact casing of the cmdlet/function. + + + Cmdlet/Function does not match its exact casing '{0}'. + + + UseCorrectCasing + + + Use process block for pipeline commands. + + + If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + + + Commands that support pipeline input should return output in a process block. + + + UseProcessBlockForPipelineCommand + \ No newline at end of file diff --git a/Rules/UseProcessBlockForPipelineCommands.cs b/Rules/UseProcessBlockForPipelineCommand.cs similarity index 81% rename from Rules/UseProcessBlockForPipelineCommands.cs rename to Rules/UseProcessBlockForPipelineCommand.cs index c3688379b..22f09f924 100644 --- a/Rules/UseProcessBlockForPipelineCommands.cs +++ b/Rules/UseProcessBlockForPipelineCommand.cs @@ -12,7 +12,7 @@ namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules #if !CORECLR [Export(typeof(IScriptRule))] #endif - public class UseProcessBlockForPipelineCommands : IScriptRule + public class UseProcessBlockForPipelineCommand : IScriptRule { public IEnumerable AnalyzeScript(Ast ast, string fileName) { @@ -35,7 +35,7 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) { foreach (var paramAstAttribute in paramAst.Attributes) { - if (!(paramAstAttribute is AttributeAst)) { continue; } + if (!(paramAstAttribute is AttributeAst)) { continue; } var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; if (namedArguments == null) { continue; } @@ -44,13 +44,13 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) { if ( - !String.Equals(namedArgument.ArgumentName, "valuefrompipeline", StringComparison.OrdinalIgnoreCase) - && !String.Equals(namedArgument.ArgumentName, "valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) + !namedArgument.ArgumentName.Equals("valuefrompipeline", StringComparison.OrdinalIgnoreCase) + && !namedArgument.ArgumentName.Equals("valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) ) { continue; } yield return new DiagnosticRecord( - string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsError, paramAst.Name.VariablePath.UserPath), + string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandError, paramAst.Name.VariablePath.UserPath), paramAst.Name.Extent, GetName(), DiagnosticSeverity.Warning, @@ -65,17 +65,17 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) public string GetName() { - return string.Format(CultureInfo.CurrentCulture, Strings.NameSpaceFormat, GetSourceName(), Strings.UseProcessBlockForPipelineCommandsName); + return string.Format(CultureInfo.CurrentCulture, Strings.NameSpaceFormat, GetSourceName(), Strings.UseProcessBlockForPipelineCommandName); } public string GetCommonName() { - return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsCommonName); + return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandCommonName); } public string GetDescription() { - return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandsDescription); + return string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandDescription); } public SourceType GetSourceType() diff --git a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 b/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 similarity index 89% rename from Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 rename to Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 index 6a0f13ce1..2d54f31eb 100644 --- a/Tests/Rules/UseProcessBlockForPipelineCommands.tests.ps1 +++ b/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 @@ -1,6 +1,6 @@ -Describe "UseProcessBlockForPipelineCommands" { +Describe "UseProcessBlockForPipelineCommand" { BeforeAll { - $RuleName = 'PSUseProcessBlockForPipelineCommands' + $RuleName = 'PSUseProcessBlockForPipelineCommand' $NoProcessBlock = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' $NoProcessBlockByPropertyName = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' $HasProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' @@ -17,7 +17,7 @@ It "has 1 violation for function " { param ($ScriptDefinition) - Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should Not BeNullOrEmpty + Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should -Not -BeNullOrEmpty } -TestCases $Cases } @@ -31,7 +31,7 @@ It "has no violations for function " { param ($ScriptDefinition) - Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should BeNullOrEmpty + Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should -BeNullOrEmpty } -TestCases $Cases } } From fbe8bc4e48483495b0ec93759406bdc9926a9c0a Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Tue, 19 Nov 2019 09:26:27 -0500 Subject: [PATCH 11/23] fix rule readme.md --- RuleDocumentation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RuleDocumentation/README.md b/RuleDocumentation/README.md index 1fa56501a..ee839524a 100644 --- a/RuleDocumentation/README.md +++ b/RuleDocumentation/README.md @@ -50,7 +50,7 @@ |[UseDeclaredVarsMoreThanAssignments](./UseDeclaredVarsMoreThanAssignments.md) | Warning | | |[UseLiteralInitializerForHashtable](./UseLiteralInitializerForHashtable.md) | Warning | | |[UseOutputTypeCorrectly](./UseOutputTypeCorrectly.md) | Information | | -|[UseProcessBlockForPipelineCommands](./UseProcessBlockForPipelineCommands.md) | Warning | | +|[UseProcessBlockForPipelineCommand](./UseProcessBlockForPipelineCommands.md) | Warning | | |[UsePSCredentialType](./UsePSCredentialType.md) | Warning | | |[UseShouldProcessForStateChangingFunctions](./UseShouldProcessForStateChangingFunctions.md) | Warning | | |[UseSingularNouns*](./UseSingularNouns.md) | Warning | | From 5921add5fe448da1195401bef739276c1a75b862 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Fri, 22 Nov 2019 07:42:47 +0000 Subject: [PATCH 12/23] clean diff for Strings.resx to avoid future merge conflicts --- Rules/Strings.resx | 2188 ++++++++++++++++++++++---------------------- 1 file changed, 1094 insertions(+), 1094 deletions(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index b7b1904d9..a9c411e4b 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1,1095 +1,1095 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. - - - Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. - - - Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. - - - Avoid Using Empty Catch Block - - - The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. - - - Avoid Using Invoke-Expression - - - Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. - - - Avoid Using Positional Parameters - - - Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. - - - The cmdlet '{0}' does not have a help comment. - - - Basic Comment Help - - - Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. - - - The cmdlet '{0}' uses an unapproved verb. - - - Cmdlet Verbs - - - Ensure declared variables are used elsewhere in the script and not just during assignment. - - - The variable '{0}' is assigned but never used. - - - Extra Variables - - - Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. - - - Found global variable '{0}'. - - - No Global Variables - - - Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. - - - $null should be on the left side of equality comparisons. - - - Null Comparison - - - Checks that cmdlets and parameters have more than one character. - - - The cmdlet name '{0}' only has one character. - - - The cmdlet '{0}' has a parameter '{1}' that only has one character. - - - A script block has a parameter '{0}' that only has one character. - - - One Char - - - For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. - - - The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. - - - Use PSCredential type. - - - Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. - - - The cmdlet '{0}' uses a reserved char in its name. - - - Reserved Cmdlet Chars - - - The cmdlet '{0}' - - - Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. - - - '{0}' defines the reserved common parameter '{1}'. - - - Reserved Parameters - - - The script - - - #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ - - - Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. - - - '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. - - - '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. - - - Should Process - - - PS - - - It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. - - - There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. - - - Use verbose message in DSC resource - - - Some fields of the module manifest (such as ModuleVersion) are required. - - - Module Manifest Fields - - - If a script file is in a PowerShell module folder, then that folder must be loadable. - - - Cannot load the module '{0}' that file '{1}' is in. - - - Module Must Be Loadable - - - Error Message is Null. - - - Password parameters that take in plaintext will expose passwords and compromise the security of your system. - - - Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. - - - Avoid Using Plain Text For Password Parameter - - - Using ConvertTo-SecureString with plain text will expose secure information. - - - File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Avoid Using SecureString With Plain Text - - - Switch parameter should not default to true. - - - File '{0}' has a switch parameter default to true. - - - Switch Parameters Should Not Default To True - - - Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. - - - Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Avoid Using ShouldContinue Without Boolean Force Parameter - - - Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. - - - File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. - - - Avoid Using Clear-Host - - - File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. - - - Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. - - - File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - Avoid Using Write-Host - - - Cmdlet should use singular instead of plural nouns. - - - The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. - - - Cmdlet Singular Noun - - - AvoidUsingCmdletAliases - - - AvoidDefaultValueSwitchParameter - - - AvoidGlobalVars - - - AvoidShouldContinueWithoutForce - - - AvoidUnloadableModule - - - AvoidUsingClearHost - - - AvoidUsingConvertToSecureStringWithPlainText - - - AvoidUsingEmptyCatchBlock - - - AvoidUsingInvokeExpression - - - AvoidUsingPlainTextForPassword - - - AvoidUsingPositionalParameters - - - AvoidUsingWriteHost - - - OneChar - - - PossibleIncorrectComparisonWithNull - - - ProvideCommentHelp - - - ReservedCmdletChar - - - ReservedParams - - - ShouldProcess - - - UseApprovedVerbs - - - UseDeclaredVarsMoreThanAssignments - - - UsePSCredentialType - - - UseSingularNouns - - - MissingModuleManifestField - - - UseVerboseMessageInDSCResource - - - Command Not Found - - - Commands that are undefined or do not exist should not be used. - - - Command '{0}' Is Not Found - - - CommandNotFound - - - Type Not Found - - - Undefined type should not be used - - - Type '{0}' is not found. Please check that it is defined. - - - TypeNotFound - - - Use Cmdlet Correctly - - - Cmdlet should be called with the mandatory parameters. - - - Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. - - - UseCmdletCorrectly - - - Use Type At Variable Assignment - - - Types should be specified at variable assignments to maintain readability and maintainability of script. - - - Specify type at the assignment of variable '{0}' - - - UseTypeAtVariableAssignment - - - Avoid Using Username and Password Parameters - - - Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. - - - Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. - - - AvoidUsingUsernameAndPasswordParams - - - Avoid Invoking Empty Members - - - Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. - - - '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. - - - AvoidInvokingEmptyMembers - - - Avoid Using ComputerName Hardcoded - - - The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. - - - The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. - - - AvoidUsingComputerNameHardcoded - - - Empty catch block is used. Please use Write-Error or throw statements in catch blocks. - - - '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. - - - Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. - - - Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. - - - {0}{1} - - - Cannot process null Ast - - - Cannot process null CommandInfo - - - PSDSC - - - Use Standard Get/Set/Test TargetResource functions in DSC Resource - - - DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. - - - Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. - - - StandardDSCFunctionsInResource - - - Avoid Using Internal URLs - - - Using Internal URLs in the scripts may cause security problems. - - - '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. - - - AvoidUsingInternalURLs - - - www.sharepoint.com - - - Use Identical Parameters For DSC Test and Set Functions - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - The Test and Set-TargetResource functions of DSC Resource must have the same parameters. - - - UseIdenticalParametersForDSC - - - Missing '{0}' function. DSC Class must implement Get, Set and Test functions. - - - Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions - - - The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. - - - The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). - - - UseIdenticalMandatoryParametersForDSC - - - Not all code path in {0} function in DSC Class {1} returns a value - - - ReturnCorrectTypesForDSCFunctions - - - Return Correct Types For DSC Functions - - - Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. - - - {0} function in DSC Class {1} should return object of type {2} - - - {0} function in DSC Class {1} should return object of type {2} instead of type {3} - - - Set function in DSC Class {0} should not return anything - - - {0} function in DSC Resource should return object of type {1} instead of {2} - - - Set-TargetResource function in DSC Resource should not output anything to the pipeline. - - - Use ShouldProcess For State Changing Functions - - - Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. - - - Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. - - - UseShouldProcessForStateChangingFunctions - - - Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance - - - Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. - - - File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - AvoidUsingWMICmdlet - - - Use OutputType Correctly - - - The return types of a cmdlet should be declared using the OutputType attribute. - - - The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. - - - UseOutputTypeCorrectly - - - DscTestsPresent - - - Dsc tests are present - - - Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. - - - No tests found for resource '{0}' - - - DscExamplesPresent - - - DSC examples are present - - - Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. - - - No examples found for resource '{0}' - - - Avoid Default Value For Mandatory Parameter - - - Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. - - - Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. - - - AvoidDefaultValueForMandatoryParameter - - - Avoid Using Deprecated Manifest Fields - - - "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. - - - AvoidUsingDeprecatedManifestFields - - - Use UTF8 Encoding For Help File - - - PowerShell help file needs to use UTF8 Encoding. - - - File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. - - - UseUTF8EncodingForHelpFile - - - Use BOM encoding for non-ASCII files - - - For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. - - - Missing BOM encoding for non-ASCII encoded file '{0}' - - - UseBOMForUnicodeEncodedFile - - - Script definition has a switch parameter default to true. - - - Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt - - - Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. - - - Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. - - - Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. - - - ScriptDefinition - - - Misleading Backtick - - - Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. - - - MisleadingBacktick - - - This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? - - - Avoid using null or empty HelpMessage parameter attribute. - - - Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. - - - HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. - - - AvoidNullOrEmptyHelpMessageAttribute - - - Use the *ToExport module manifest fields. - - - In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. - - - Do not use wildcard or $null in this field. Explicitly specify a list for {0}. - - - UseToExportFieldsInManifest - - - Replace {0} with {1} - - - Set {0} type to SecureString - - - Add {0} = {1} to the module manifest - - - Replace {0} with {1} - - - Create hashtables with literal initializers - - - Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default - - - Create hashtables with literal initliazers - - - UseLiteralInitializerForHashtable - - - UseCompatibleCmdlets - - - Use compatible cmdlets - - - Use cmdlets compatible with the given PowerShell version and edition and operating system - - - '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' - - - UseCompatibleCommands - - - Use compatible commands - - - Use commands compatible with the given PowerShell version and operating system - - - The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleTypes - - - Use compatible types - - - Use types compatible with the given PowerShell version and operating system - - - The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' - - - UseCompatibleSyntax - - - Use compatible syntax - - - Use script syntax compatible with the given PowerShell versions - - - The {0} syntax '{1}' is not available by default in PowerShell versions {2} - - - Use the '{0}' syntax instead for compatibility with PowerShell versions {1} - - - The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' - - - Avoid global functiosn and aliases - - - Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. - - - Avoid creating functions with a Global scope. - - - AvoidGlobalFunctions - - - Avoid global aliases. - - - Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. - - - Avoid creating aliases with a Global scope. - - - AvoidGlobalAliases - - - AvoidTrailingWhitespace - - - Avoid trailing whitespace - - - Each line should have no trailing whitespace. - - - Line has trailing whitespace - - - AvoidLongLines - - - Avoid long lines - - - Line lengths should be less than the configured maximum - - - Line exceeds the configured maximum length of {0} characters - - - PlaceOpenBrace - - - Place open braces consistently - - - Place open braces either on the same line as the preceding expression or on a new line. - - - Open brace not on same line as preceding keyword. It should be on the same line. - - - Open brace is not on a new line. - - - There is no new line after open brace. - - - PlaceCloseBrace - - - Place close braces - - - Close brace should be on a new line by itself. - - - Close brace is not on a new line. - - - Close brace does not follow a non-empty line. - - - Close brace does not follow a new line. - - - Close brace before a branch statement is followed by a new line. - - - UseConsistentIndentation - - - Use consistent indentation - - - Each statement block should have a consistent indenation. - - - Indentation not consistent - - - UseConsistentWhitespace - - - Use whitespaces - - - Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') - - - Use space before open brace. - - - Use space before open parenthesis. - - - Use space before and after binary and assignment operators. - - - Use space after a comma. - - - Use space after a semicolon. - - - UseSupportsShouldProcess - - - Use SupportsShouldProcess - - - Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. - - - Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. - - - AlignAssignmentStatement - - - Align assignment statement - - - Line up assignment statements such that the assignment operator are aligned. - - - Assignment statements are not aligned - - - '=' is not an assignment operator. Did you mean the equality operator '-eq'? - - - PossibleIncorrectUsageOfAssignmentOperator - - - Use a different variable name - - - Changing automtic variables might have undesired side effects - - - This automatic variables is built into PowerShell and readonly. - - - The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - AvoidAssignmentToAutomaticVariable - - - Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. - - - '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. - - - '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. - - - Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. - - - '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). - - - When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. - - - Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). - - - PossibleIncorrectUsageOfRedirectionOperator - - - Use $null on the left hand side for safe comparison with $null. - - - Use space after open brace. - - - Use space before closing brace. - - - Use space after pipe. - - - Use space before pipe. - - - Use exact casing of cmdlet/function name. - - - For better readability and consistency, use the exact casing of the cmdlet/function. - - - Cmdlet/Function does not match its exact casing '{0}'. - - - UseCorrectCasing - - - Use process block for pipeline commands. - - - If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. - - - Commands that support pipeline input should return output in a process block. - - - UseProcessBlockForPipelineCommand - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability. + + + Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix. + + + Empty catch blocks are considered poor design decisions because if an error occurs in the try block, this error is simply swallowed and not acted upon. While this does not inherently lead to bad things. It can and this should be avoided if possible. To fix a violation of this rule, using Write-Error or throw statements in catch blocks. + + + Avoid Using Empty Catch Block + + + The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of the expression or command. It can be extraordinarily powerful so it is not that you want to never use it but you need to be very careful about using it. In particular, you are probably on safe ground if the data only comes from the program itself. If you include any data provided from the user - you need to protect yourself from Code Injection. To fix a violation of this rule, please remove Invoke-Expression from script and find other options instead. + + + Avoid Using Invoke-Expression + + + Readability and clarity should be the goal of any script we expect to maintain over time. When calling a command that takes parameters, where possible consider using name parameters as opposed to positional parameters. To fix a violation of this rule, please use named parameters instead of positional parameters when calling a command. + + + Avoid Using Positional Parameters + + + Checks that all cmdlets have a help comment. This rule only checks existence. It does not check the content of the comment. + + + The cmdlet '{0}' does not have a help comment. + + + Basic Comment Help + + + Checks that all defined cmdlets use approved verbs. This is in line with PowerShell's best practices. + + + The cmdlet '{0}' uses an unapproved verb. + + + Cmdlet Verbs + + + Ensure declared variables are used elsewhere in the script and not just during assignment. + + + The variable '{0}' is assigned but never used. + + + Extra Variables + + + Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems. + + + Found global variable '{0}'. + + + No Global Variables + + + Checks that $null is on the left side of any equaltiy comparisons (eq, ne, ceq, cne, ieq, ine). When there is an array on the left side of a null equality comparison, PowerShell will check for a $null IN the array rather than if the array is null. If the two sides of the comaprision are switched this is fixed. Therefore, $null should always be on the left side of equality comparisons just in case. + + + $null should be on the left side of equality comparisons. + + + Null Comparison + + + Checks that cmdlets and parameters have more than one character. + + + The cmdlet name '{0}' only has one character. + + + The cmdlet '{0}' has a parameter '{1}' that only has one character. + + + A script block has a parameter '{0}' that only has one character. + + + One Char + + + For PowerShell 4.0 and earlier, a parameter named Credential with type PSCredential must have a credential transformation attribute defined after the PSCredential type attribute. + + + The Credential parameter in '{0}' must be of type PSCredential. For PowerShell 4.0 and earlier, please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + The Credential parameter found in the script block must be of type PSCredential. For PowerShell 4.0 and earlier please define a credential transformation attribute, e.g. [System.Management.Automation.Credential()], after the PSCredential type attribute. + + + Use PSCredential type. + + + Checks for reserved characters in cmdlet names. These characters usually cause a parsing error. Otherwise they will generally cause runtime errors. + + + The cmdlet '{0}' uses a reserved char in its name. + + + Reserved Cmdlet Chars + + + The cmdlet '{0}' + + + Checks for reserved parameters in function definitions. If these parameters are defined by the user, an error generally occurs. + + + '{0}' defines the reserved common parameter '{1}'. + + + Reserved Parameters + + + The script + + + #,(){}[]&/\\$^;:\"'<>|?@`*%+=~ + + + Checks that if the SupportsShouldProcess is present, the function calls ShouldProcess/ShouldContinue and vice versa. Scripts with one or the other but not both will generally run into an error or unexpected behavior. + + + '{0}' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + A script block has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. + + + '{0}' calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + A script block calls ShouldProcess/ShouldContinue but does not have the ShouldProcess attribute. + + + Should Process + + + PS + + + It is a best practice to emit informative, verbose messages in DSC resource functions. This helps in debugging issues when a DSC configuration is executed. + + + There is no call to Write-Verbose in DSC function '{0}'. If you are using Write-Verbose in a helper function, suppress this rule application. + + + Use verbose message in DSC resource + + + Some fields of the module manifest (such as ModuleVersion) are required. + + + Module Manifest Fields + + + If a script file is in a PowerShell module folder, then that folder must be loadable. + + + Cannot load the module '{0}' that file '{1}' is in. + + + Module Must Be Loadable + + + Error Message is Null. + + + Password parameters that take in plaintext will expose passwords and compromise the security of your system. + + + Parameter '{0}' should use SecureString, otherwise this will expose sensitive information. See ConvertTo-SecureString for more information. + + + Avoid Using Plain Text For Password Parameter + + + Using ConvertTo-SecureString with plain text will expose secure information. + + + File '{0}' uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Avoid Using SecureString With Plain Text + + + Switch parameter should not default to true. + + + File '{0}' has a switch parameter default to true. + + + Switch Parameters Should Not Default To True + + + Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it. + + + Function '{0}' in file '{1}' uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Avoid Using ShouldContinue Without Boolean Force Parameter + + + Using Clear-Host is not recommended because the cmdlet may not work in some hosts or there may even be no hosts at all. + + + File '{0}' uses Clear-Host. This is not recommended because it may not work in some hosts or there may even be no hosts at all. + + + Avoid Using Clear-Host + + + File '{0}' uses Console.'{1}'. Using Console to write is not recommended because it may not work in all hosts or there may even be no hosts at all. Use Write-Output instead. + + + Avoid using the Write-Host cmdlet. Instead, use Write-Output, Write-Verbose, or Write-Information. Because Write-Host is host-specific, its implementation might vary unpredictably. Also, prior to PowerShell 5.0, Write-Host did not write to a stream, so users cannot suppress it, capture its value, or redirect it. + + + File '{0}' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + Avoid Using Write-Host + + + Cmdlet should use singular instead of plural nouns. + + + The cmdlet '{0}' uses a plural noun. A singular noun should be used instead. + + + Cmdlet Singular Noun + + + AvoidUsingCmdletAliases + + + AvoidDefaultValueSwitchParameter + + + AvoidGlobalVars + + + AvoidShouldContinueWithoutForce + + + AvoidUnloadableModule + + + AvoidUsingClearHost + + + AvoidUsingConvertToSecureStringWithPlainText + + + AvoidUsingEmptyCatchBlock + + + AvoidUsingInvokeExpression + + + AvoidUsingPlainTextForPassword + + + AvoidUsingPositionalParameters + + + AvoidUsingWriteHost + + + OneChar + + + PossibleIncorrectComparisonWithNull + + + ProvideCommentHelp + + + ReservedCmdletChar + + + ReservedParams + + + ShouldProcess + + + UseApprovedVerbs + + + UseDeclaredVarsMoreThanAssignments + + + UsePSCredentialType + + + UseSingularNouns + + + MissingModuleManifestField + + + UseVerboseMessageInDSCResource + + + Command Not Found + + + Commands that are undefined or do not exist should not be used. + + + Command '{0}' Is Not Found + + + CommandNotFound + + + Type Not Found + + + Undefined type should not be used + + + Type '{0}' is not found. Please check that it is defined. + + + TypeNotFound + + + Use Cmdlet Correctly + + + Cmdlet should be called with the mandatory parameters. + + + Cmdlet '{0}' may be used incorrectly. Please check that all mandatory parameters are supplied. + + + UseCmdletCorrectly + + + Use Type At Variable Assignment + + + Types should be specified at variable assignments to maintain readability and maintainability of script. + + + Specify type at the assignment of variable '{0}' + + + UseTypeAtVariableAssignment + + + Avoid Using Username and Password Parameters + + + Functions should take in a Credential parameter of type PSCredential (with a Credential transformation attribute defined after it in PowerShell 4.0 or earlier) or set the Password parameter to type SecureString. + + + Function '{0}' has both Username and Password parameters. Either set the type of the Password parameter to SecureString or replace the Username and Password parameters with a Credential parameter of type PSCredential. If using a Credential parameter in PowerShell 4.0 or earlier, please define a credential transformation attribute after the PSCredential type attribute. + + + AvoidUsingUsernameAndPasswordParams + + + Avoid Invoking Empty Members + + + Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant. + + + '{0}' has non-constant members. Invoking non-constant members may cause bugs in the script. + + + AvoidInvokingEmptyMembers + + + Avoid Using ComputerName Hardcoded + + + The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system. + + + The ComputerName parameter of cmdlet '{0}' is hardcoded. This will expose sensitive information about the system if the script is shared. + + + AvoidUsingComputerNameHardcoded + + + Empty catch block is used. Please use Write-Error or throw statements in catch blocks. + + + '{0}' is an alias of '{1}'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content. + + + Invoke-Expression is used. Please remove Invoke-Expression from script and find other options instead. + + + Cmdlet '{0}' has positional parameter. Please use named parameters instead of positional parameters when calling a command. + + + {0}{1} + + + Cannot process null Ast + + + Cannot process null CommandInfo + + + PSDSC + + + Use Standard Get/Set/Test TargetResource functions in DSC Resource + + + DSC Resource must implement Get, Set and Test-TargetResource functions. DSC Class must implement Get, Set and Test functions. + + + Missing '{0}' function. DSC Resource must implement Get, Set and Test-TargetResource functions. + + + StandardDSCFunctionsInResource + + + Avoid Using Internal URLs + + + Using Internal URLs in the scripts may cause security problems. + + + '{0}' could be an internal URL. Using internal URL directly in the script may cause potential information disclosure. + + + AvoidUsingInternalURLs + + + www.sharepoint.com + + + Use Identical Parameters For DSC Test and Set Functions + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + The Test and Set-TargetResource functions of DSC Resource must have the same parameters. + + + UseIdenticalParametersForDSC + + + Missing '{0}' function. DSC Class must implement Get, Set and Test functions. + + + Use identical mandatory parameters for DSC Get/Test/Set TargetResource functions + + + The Get/Test/Set TargetResource functions of DSC resource must have the same mandatory parameters. + + + The '{0}' parameter '{1}' is not present in '{2}' DSC resource function(s). + + + UseIdenticalMandatoryParametersForDSC + + + Not all code path in {0} function in DSC Class {1} returns a value + + + ReturnCorrectTypesForDSCFunctions + + + Return Correct Types For DSC Functions + + + Set function in DSC class and Set-TargetResource in DSC resource must not return anything. Get function in DSC class must return an instance of the DSC class and Get-TargetResource function in DSC resource must return a hashtable. Test function in DSC class and Get-TargetResource function in DSC resource must return a boolean. + + + {0} function in DSC Class {1} should return object of type {2} + + + {0} function in DSC Class {1} should return object of type {2} instead of type {3} + + + Set function in DSC Class {0} should not return anything + + + {0} function in DSC Resource should return object of type {1} instead of {2} + + + Set-TargetResource function in DSC Resource should not output anything to the pipeline. + + + Use ShouldProcess For State Changing Functions + + + Functions that have verbs like New, Start, Stop, Set, Reset, Restart that change system state should support 'ShouldProcess'. + + + Function '{0}' has verb that could change system state. Therefore, the function has to support 'ShouldProcess'. + + + UseShouldProcessForStateChangingFunctions + + + Avoid Using Get-WMIObject, Remove-WMIObject, Invoke-WmiMethod, Register-WmiEvent, Set-WmiInstance + + + Deprecated. Starting in Windows PowerShell 3.0, these cmdlets have been superseded by CIM cmdlets. + + + File '{0}' uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + AvoidUsingWMICmdlet + + + Use OutputType Correctly + + + The return types of a cmdlet should be declared using the OutputType attribute. + + + The cmdlet '{0}' returns an object of type '{1}' but this type is not declared in the OutputType attribute. + + + UseOutputTypeCorrectly + + + DscTestsPresent + + + Dsc tests are present + + + Every DSC resource module should contain folder "Tests" with tests for every resource. Test scripts should have resource name they are testing in the file name. + + + No tests found for resource '{0}' + + + DscExamplesPresent + + + DSC examples are present + + + Every DSC resource module should contain folder "Examples" with sample configurations for every resource. Sample configurations should have resource name they are demonstrating in the title. + + + No examples found for resource '{0}' + + + Avoid Default Value For Mandatory Parameter + + + Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored.. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block. + + + Mandatory Parameter '{0}' is initialized in the Param block. To fix a violation of this rule, please leave it uninitialized. + + + AvoidDefaultValueForMandatoryParameter + + + Avoid Using Deprecated Manifest Fields + + + "ModuleToProcess" is obsolete in the latest PowerShell version. Please update with the latest field "RootModule" in manifest files to avoid PowerShell version inconsistency. + + + AvoidUsingDeprecatedManifestFields + + + Use UTF8 Encoding For Help File + + + PowerShell help file needs to use UTF8 Encoding. + + + File {0} has to use UTF8 instead of {1} encoding because it is a powershell help file. + + + UseUTF8EncodingForHelpFile + + + Use BOM encoding for non-ASCII files + + + For a file encoded with a format other than ASCII, ensure BOM is present to ensure that any application consuming this file can interpret it correctly. + + + Missing BOM encoding for non-ASCII encoded file '{0}' + + + UseBOMForUnicodeEncodedFile + + + Script definition has a switch parameter default to true. + + + Function '{0}' in script definition uses ShouldContinue but does not have a boolean force parameter. The force parameter will allow users of the script to bypass ShouldContinue prompt + + + Script definition uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead. + + + Script definition uses WMI cmdlet. For PowerShell 3.0 and above, use CIM cmdlet which perform the same tasks as the WMI cmdlets. The CIM cmdlets comply with WS-Management (WSMan) standards and with the Common Information Model (CIM) standard, which enables the cmdlets to use the same techniques to manage Windows computers and those running other operating systems. + + + Script definition uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. + + + ScriptDefinition + + + Misleading Backtick + + + Ending a line with an escaped whitepsace character is misleading. A trailing backtick is usually used for line continuation. Users typically don't intend to end a line with escaped whitespace. + + + MisleadingBacktick + + + This line has a backtick at the end trailed by a whitespace character. Did you mean for this to be a line continuation? + + + Avoid using null or empty HelpMessage parameter attribute. + + + Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function. + + + HelpMessage parameter attribute should not be null or empty. To fix a violation of this rule, please set its value to a non-empty string. + + + AvoidNullOrEmptyHelpMessageAttribute + + + Use the *ToExport module manifest fields. + + + In a module manifest, AliasesToExport, CmdletsToExport, FunctionsToExport and VariablesToExport fields should not use wildcards or $null in their entries. During module auto-discovery, if any of these entries are missing or $null or wildcard, PowerShell does some potentially expensive work to analyze the rest of the module. + + + Do not use wildcard or $null in this field. Explicitly specify a list for {0}. + + + UseToExportFieldsInManifest + + + Replace {0} with {1} + + + Set {0} type to SecureString + + + Add {0} = {1} to the module manifest + + + Replace {0} with {1} + + + Create hashtables with literal initializers + + + Use literal initializer, @{{}}, for creating a hashtable as they are case-insensitive by default + + + Create hashtables with literal initliazers + + + UseLiteralInitializerForHashtable + + + UseCompatibleCmdlets + + + Use compatible cmdlets + + + Use cmdlets compatible with the given PowerShell version and edition and operating system + + + '{0}' is not compatible with PowerShell edition '{1}', version '{2}' and OS '{3}' + + + UseCompatibleCommands + + + Use compatible commands + + + Use commands compatible with the given PowerShell version and operating system + + + The command '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The parameter '{0}' is not available for command '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleTypes + + + Use compatible types + + + Use types compatible with the given PowerShell version and operating system + + + The type '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + The method '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + The member '{0}' is not available on type '{1}' by default in PowerShell version '{2}' on platform '{3}' + + + UseCompatibleSyntax + + + Use compatible syntax + + + Use script syntax compatible with the given PowerShell versions + + + The {0} syntax '{1}' is not available by default in PowerShell versions {2} + + + Use the '{0}' syntax instead for compatibility with PowerShell versions {1} + + + The type accelerator '{0}' is not available by default in PowerShell version '{1}' on platform '{2}' + + + Avoid global functiosn and aliases + + + Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems. + + + Avoid creating functions with a Global scope. + + + AvoidGlobalFunctions + + + Avoid global aliases. + + + Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts. + + + Avoid creating aliases with a Global scope. + + + AvoidGlobalAliases + + + AvoidTrailingWhitespace + + + Avoid trailing whitespace + + + Each line should have no trailing whitespace. + + + Line has trailing whitespace + + + AvoidLongLines + + + Avoid long lines + + + Line lengths should be less than the configured maximum + + + Line exceeds the configured maximum length of {0} characters + + + PlaceOpenBrace + + + Place open braces consistently + + + Place open braces either on the same line as the preceding expression or on a new line. + + + Open brace not on same line as preceding keyword. It should be on the same line. + + + Open brace is not on a new line. + + + There is no new line after open brace. + + + PlaceCloseBrace + + + Place close braces + + + Close brace should be on a new line by itself. + + + Close brace is not on a new line. + + + Close brace does not follow a non-empty line. + + + Close brace does not follow a new line. + + + Close brace before a branch statement is followed by a new line. + + + UseConsistentIndentation + + + Use consistent indentation + + + Each statement block should have a consistent indenation. + + + Indentation not consistent + + + UseConsistentWhitespace + + + Use whitespaces + + + Check for whitespace between keyword and open paren/curly, around assigment operator ('='), around arithmetic operators and after separators (',' and ';') + + + Use space before open brace. + + + Use space before open parenthesis. + + + Use space before and after binary and assignment operators. + + + Use space after a comma. + + + Use space after a semicolon. + + + UseSupportsShouldProcess + + + Use SupportsShouldProcess + + + Commands typically provide Confirm and Whatif parameters to give more control on its execution in an interactive environment. In PowerShell, a command can use a SupportsShouldProcess attribute to provide this capability. Hence, manual addition of these parameters to a command is discouraged. If a commands need Confirm and Whatif parameters, then it should support ShouldProcess. + + + Whatif and/or Confirm manually defined in function {0}. Instead, please use SupportsShouldProcess attribute. + + + AlignAssignmentStatement + + + Align assignment statement + + + Line up assignment statements such that the assignment operator are aligned. + + + Assignment statements are not aligned + + + '=' is not an assignment operator. Did you mean the equality operator '-eq'? + + + PossibleIncorrectUsageOfAssignmentOperator + + + Use a different variable name + + + Changing automtic variables might have undesired side effects + + + This automatic variables is built into PowerShell and readonly. + + + The Variable '{0}' cannot be assigned since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + AvoidAssignmentToAutomaticVariable + + + Starting from PowerShell 6.0, the Variable '{0}' cannot be assigned any more since it is a readonly automatic variable that is built into PowerShell, please use a different name. + + + '{0}' is implicitly aliasing '{1}' because it is missing the 'Get-' prefix. This can introduce possible problems and make scripts hard to maintain. Please consider changing command to its full name. + + + '=' or '==' are not comparison operators in the PowerShell language and rarely needed inside conditional statements. + + + Did you mean to use the assignment operator '='? The equality operator in PowerShell is 'eq'. + + + '>' is not a comparison operator. Use '-gt' (greater than) or '-ge' (greater or equal). + + + When switching between different languages it is easy to forget that '>' does not mean 'great than' in PowerShell. + + + Did you mean to use the redirection operator '>'? The comparison operators in PowerShell are '-gt' (greater than) or '-ge' (greater or equal). + + + PossibleIncorrectUsageOfRedirectionOperator + + + Use $null on the left hand side for safe comparison with $null. + + + Use space after open brace. + + + Use space before closing brace. + + + Use space after pipe. + + + Use space before pipe. + + + Use exact casing of cmdlet/function name. + + + For better readability and consistency, use the exact casing of the cmdlet/function. + + + Cmdlet/Function does not match its exact casing '{0}'. + + + UseCorrectCasing + + + Use process block for pipeline commands. + + + If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + + + Commands that support pipeline input should return output in a process block. + + + UseProcessBlockForPipelineCommand + \ No newline at end of file From 79aaf0f7dc894efa7973df23acabd8e0fe1f7708 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Fri, 22 Nov 2019 07:49:27 +0000 Subject: [PATCH 13/23] Fix last 2 rule documentation test failures by fixing markdown link --- RuleDocumentation/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RuleDocumentation/README.md b/RuleDocumentation/README.md index ee839524a..b13e29c50 100644 --- a/RuleDocumentation/README.md +++ b/RuleDocumentation/README.md @@ -50,7 +50,7 @@ |[UseDeclaredVarsMoreThanAssignments](./UseDeclaredVarsMoreThanAssignments.md) | Warning | | |[UseLiteralInitializerForHashtable](./UseLiteralInitializerForHashtable.md) | Warning | | |[UseOutputTypeCorrectly](./UseOutputTypeCorrectly.md) | Information | | -|[UseProcessBlockForPipelineCommand](./UseProcessBlockForPipelineCommands.md) | Warning | | +|[UseProcessBlockForPipelineCommand](./UseProcessBlockForPipelineCommand.md) | Warning | | |[UsePSCredentialType](./UsePSCredentialType.md) | Warning | | |[UseShouldProcessForStateChangingFunctions](./UseShouldProcessForStateChangingFunctions.md) | Warning | | |[UseSingularNouns*](./UseSingularNouns.md) | Warning | | From 850b4572935610090ae01a22e53aadc7a0215858 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Fri, 22 Nov 2019 07:18:06 -0500 Subject: [PATCH 14/23] Update Rules/Strings.resx Co-Authored-By: Christoph Bergmeister [MVP] --- Rules/Strings.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index a9c411e4b..088630593 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1081,7 +1081,7 @@ UseCorrectCasing - Use process block for pipeline commands. + Use process block for command that accepts input from pipeline. If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. @@ -1092,4 +1092,4 @@ UseProcessBlockForPipelineCommand - \ No newline at end of file + From 61220e7aec283fbf52317b2964b89cc34327cae4 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Fri, 22 Nov 2019 07:18:19 -0500 Subject: [PATCH 15/23] Update Rules/Strings.resx Co-Authored-By: Christoph Bergmeister [MVP] --- Rules/Strings.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index 088630593..a4788366f 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1087,7 +1087,7 @@ If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. - Commands that support pipeline input should return output in a process block. + Command accepts pipeline input but has not defined a required process block. UseProcessBlockForPipelineCommand From fcae26024c5c0c98a4c7286af303c0d2797c4c43 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Fri, 22 Nov 2019 07:18:26 -0500 Subject: [PATCH 16/23] Update Rules/Strings.resx Co-Authored-By: Christoph Bergmeister [MVP] --- Rules/Strings.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index a4788366f..ee40ac504 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1084,7 +1084,7 @@ Use process block for command that accepts input from pipeline. - If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features. + If a parameter accepts input via the pipeline, the function has to use at least a process block in order to be able to bind the input objects from the pipeline. Command accepts pipeline input but has not defined a required process block. From 504fdd6117ba82cc2234dcf1361f002c9cac51a4 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Fri, 22 Nov 2019 17:14:16 +0000 Subject: [PATCH 17/23] empty-commit to re-trigger CI due to sporadic failure From a593ff71d6e2ad281b9b12548c28c8cddaa4daeb Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Mon, 25 Nov 2019 15:59:58 -0500 Subject: [PATCH 18/23] Update Rules/Strings.resx Co-Authored-By: Robert Holt --- Rules/Strings.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index ee40ac504..dabfbd2ef 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1084,7 +1084,7 @@ Use process block for command that accepts input from pipeline. - If a parameter accepts input via the pipeline, the function has to use at least a process block in order to be able to bind the input objects from the pipeline. + If a function parameter takes its value from the pipeline, the function must use a process block to bind the input objects from the pipeline to that parameter. Command accepts pipeline input but has not defined a required process block. From 4a358a01500a013a930f2ceeda9436492150c80a Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Mon, 25 Nov 2019 16:00:19 -0500 Subject: [PATCH 19/23] Update Rules/Strings.resx Co-Authored-By: Robert Holt --- Rules/Strings.resx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rules/Strings.resx b/Rules/Strings.resx index dabfbd2ef..8f2c1844c 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1087,7 +1087,7 @@ If a function parameter takes its value from the pipeline, the function must use a process block to bind the input objects from the pipeline to that parameter. - Command accepts pipeline input but has not defined a required process block. + Command accepts pipeline input but has not defined a process block. UseProcessBlockForPipelineCommand From 707f02d96ac5763afaf0b69649d787f8f25b2492 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Tue, 3 Dec 2019 22:27:16 -0500 Subject: [PATCH 20/23] corrections to use process block rule and tests - candidate for merge --- Rules/UseProcessBlockForPipelineCommand.cs | 26 ++++++---- ...seProcessBlockForPipelineCommand.tests.ps1 | 52 +++++++++++++------ 2 files changed, 52 insertions(+), 26 deletions(-) diff --git a/Rules/UseProcessBlockForPipelineCommand.cs b/Rules/UseProcessBlockForPipelineCommand.cs index 22f09f924..c0ab4b5d0 100644 --- a/Rules/UseProcessBlockForPipelineCommand.cs +++ b/Rules/UseProcessBlockForPipelineCommand.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; using System.Collections.Generic; using System.Management.Automation.Language; using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic; @@ -16,22 +19,25 @@ public class UseProcessBlockForPipelineCommand : IScriptRule { public IEnumerable AnalyzeScript(Ast ast, string fileName) { - if (ast == null) throw new ArgumentNullException(Strings.NullAstErrorMessage); - - IEnumerable functionAsts = ast.FindAll(testAst => testAst is FunctionDefinitionAst, true); + if (ast == null) + { + throw new ArgumentNullException(Strings.NullAstErrorMessage); + } - foreach (FunctionDefinitionAst funcAst in functionAsts) + IEnumerable scriptblockAsts = ast.FindAll(testAst => testAst is ScriptBlockAst, true); + + foreach (ScriptBlockAst scriptblockAst in scriptblockAsts) { if ( - funcAst.Body.ParamBlock == null - || funcAst.Body.ParamBlock.Attributes == null - || funcAst.Body.ParamBlock.Parameters == null - || funcAst.Body.ProcessBlock != null + scriptblockAst.ParamBlock == null + || scriptblockAst.ParamBlock.Attributes == null + || scriptblockAst.ParamBlock.Parameters == null + || scriptblockAst.ProcessBlock != null ) { continue; } - foreach (var paramAst in funcAst.Body.ParamBlock.Parameters) + foreach (var paramAst in scriptblockAst.ParamBlock.Parameters) { foreach (var paramAstAttribute in paramAst.Attributes) { diff --git a/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 b/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 index 2d54f31eb..c4caf2c0c 100644 --- a/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 +++ b/Tests/Rules/UseProcessBlockForPipelineCommand.tests.ps1 @@ -1,37 +1,57 @@ Describe "UseProcessBlockForPipelineCommand" { BeforeAll { $RuleName = 'PSUseProcessBlockForPipelineCommand' - $NoProcessBlock = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' - $NoProcessBlockByPropertyName = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' - $HasProcessBlock = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' - $HasProcessBlockByPropertyName = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' - $NoAttribute = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()]$Param1) }' - $HasTypeDeclaration = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()][string]$Param1) }' } Context "When there are violations" { $Cases = @( - @{ScriptDefinition = $NoProcessBlock; Name = "NoProcessBlock"} - @{ScriptDefinition = $NoProcessBlockByPropertyName; Name = "NoProcessBlockByPropertyName"} + @{ + ScriptDefinition = 'function BadFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' + Name = "function without process block" + } + @{ + ScriptDefinition = 'function $BadFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) }' + Name = "function without process block by property name" + } + @{ + ScriptDefinition = '{ [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) }' + Name = "scriptblock without process block" + } ) - It "has 1 violation for function " { + It "has 1 violation for " -TestCases $Cases { param ($ScriptDefinition) Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should -Not -BeNullOrEmpty - } -TestCases $Cases + } } Context "When there are no violations" { $Cases = @( - @{ScriptDefinition = $HasProcessBlock; Name = "HasProcessBlock" } - @{ScriptDefinition = $HasProcessBlockByPropertyName; Name = "HasProcessBlockByPropertyName" } - @{ScriptDefinition = $NoAttribute; Name = "NoAttribute" } - @{ScriptDefinition = $HasTypeDeclaration; Name = "HasTypeDeclaration"} + @{ + ScriptDefinition = 'function GoodFunc1 { [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' + Name = "function with process block" + } + @{ + ScriptDefinition = 'function GoodFunc2 { [CmdletBinding()] param ([Parameter(ValueFromPipelineByPropertyName)]$Param1) process { } }' + Name = "function with process block by property name" + } + @{ + ScriptDefinition = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()]$Param1) }' + Name = "function without pipeline" + } + @{ + ScriptDefinition = 'function GoodFunc3 { [CmdletBinding()] param ([Parameter()][string]$Param1) }' + Name = "function with parameter type name" + } + @{ + ScriptDefinition = '{ [CmdletBinding()] param ([Parameter(ValueFromPipeline)]$Param1) process { } }' + Name = "scriptblock with process block" + } ) - It "has no violations for function " { + It "has no violations for function " -TestCases $Cases { param ($ScriptDefinition) Invoke-ScriptAnalyzer -ScriptDefinition $ScriptDefinition -IncludeRule $RuleName | Should -BeNullOrEmpty - } -TestCases $Cases + } } } From c7a2531c4ea8310ffe2361a3391fc70ea3156644 Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Wed, 4 Dec 2019 17:33:29 -0500 Subject: [PATCH 21/23] More style fixes for #1373 --- Rules/UseProcessBlockForPipelineCommand.cs | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/Rules/UseProcessBlockForPipelineCommand.cs b/Rules/UseProcessBlockForPipelineCommand.cs index c0ab4b5d0..3bfd82d6f 100644 --- a/Rules/UseProcessBlockForPipelineCommand.cs +++ b/Rules/UseProcessBlockForPipelineCommand.cs @@ -28,32 +28,28 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) foreach (ScriptBlockAst scriptblockAst in scriptblockAsts) { - if - ( - scriptblockAst.ParamBlock == null - || scriptblockAst.ParamBlock.Attributes == null - || scriptblockAst.ParamBlock.Parameters == null - || scriptblockAst.ProcessBlock != null - ) - { continue; } + if (scriptblockAst.ProcessBlock != null + || scriptblockAst.ParamBlock?.Attributes == null + || scriptblockAst.ParamBlock.Parameters == null) + { + continue; + } foreach (var paramAst in scriptblockAst.ParamBlock.Parameters) { foreach (var paramAstAttribute in paramAst.Attributes) { - if (!(paramAstAttribute is AttributeAst)) { continue; } + if (!(paramAstAttribute is AttributeAst paramAttributeAst)) { continue; } - var namedArguments = (paramAstAttribute as AttributeAst).NamedArguments; - if (namedArguments == null) { continue; } + if (paramAttributeAst.NamedArguments == null) { continue; } - foreach (NamedAttributeArgumentAst namedArgument in namedArguments) + foreach (NamedAttributeArgumentAst namedArgument in paramAttributeAst.NamedArguments) { - if - ( - !namedArgument.ArgumentName.Equals("valuefrompipeline", StringComparison.OrdinalIgnoreCase) - && !namedArgument.ArgumentName.Equals("valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase) - ) - { continue; } + if (!namedArgument.ArgumentName.Equals("valuefrompipeline", StringComparison.OrdinalIgnoreCase) + && !namedArgument.ArgumentName.Equals("valuefrompipelinebypropertyname", StringComparison.OrdinalIgnoreCase)) + { + continue; + } yield return new DiagnosticRecord( string.Format(CultureInfo.CurrentCulture, Strings.UseProcessBlockForPipelineCommandError, paramAst.Name.VariablePath.UserPath), From a7ed1228e96f20eda47fe2ac3ff1b89c0f40c92a Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Thu, 5 Dec 2019 07:57:41 -0500 Subject: [PATCH 22/23] update localized strings --- Rules/Strings.Designer.cs | 6 +++--- Rules/Strings.resx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Rules/Strings.Designer.cs b/Rules/Strings.Designer.cs index c91206664..ad071a5a1 100644 --- a/Rules/Strings.Designer.cs +++ b/Rules/Strings.Designer.cs @@ -2599,7 +2599,7 @@ internal static string UseOutputTypeCorrectlyName { } /// - /// Looks up a localized string similar to Use process block for pipeline commands.. + /// Looks up a localized string similar to Use process block for command that accepts input from pipeline.. /// internal static string UseProcessBlockForPipelineCommandCommonName { get { @@ -2608,7 +2608,7 @@ internal static string UseProcessBlockForPipelineCommandCommonName { } /// - /// Looks up a localized string similar to If a parameter accepts input via the pipeline, the function should use at least a process block to correctly support pipeline features.. + /// Looks up a localized string similar to If a command parameter takes its value from the pipeline, the command must use a process block to bind the input objects from the pipeline to that parameter.. /// internal static string UseProcessBlockForPipelineCommandDescription { get { @@ -2617,7 +2617,7 @@ internal static string UseProcessBlockForPipelineCommandDescription { } /// - /// Looks up a localized string similar to Commands that support pipeline input should return output in a process block.. + /// Looks up a localized string similar to Command accepts pipeline input but has not defined a process block.. /// internal static string UseProcessBlockForPipelineCommandError { get { diff --git a/Rules/Strings.resx b/Rules/Strings.resx index 8f2c1844c..a11cf0922 100644 --- a/Rules/Strings.resx +++ b/Rules/Strings.resx @@ -1084,7 +1084,7 @@ Use process block for command that accepts input from pipeline. - If a function parameter takes its value from the pipeline, the function must use a process block to bind the input objects from the pipeline to that parameter. + If a command parameter takes its value from the pipeline, the command must use a process block to bind the input objects from the pipeline to that parameter. Command accepts pipeline input but has not defined a process block. From a28b4d25a432058b576818756a79e76b035feadb Mon Sep 17 00:00:00 2001 From: Matt McNabb Date: Thu, 5 Dec 2019 08:10:28 -0500 Subject: [PATCH 23/23] replace implicitly typed vars --- Rules/UseProcessBlockForPipelineCommand.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rules/UseProcessBlockForPipelineCommand.cs b/Rules/UseProcessBlockForPipelineCommand.cs index 3bfd82d6f..4b2298855 100644 --- a/Rules/UseProcessBlockForPipelineCommand.cs +++ b/Rules/UseProcessBlockForPipelineCommand.cs @@ -35,9 +35,9 @@ public IEnumerable AnalyzeScript(Ast ast, string fileName) continue; } - foreach (var paramAst in scriptblockAst.ParamBlock.Parameters) + foreach (ParameterAst paramAst in scriptblockAst.ParamBlock.Parameters) { - foreach (var paramAstAttribute in paramAst.Attributes) + foreach (AttributeBaseAst paramAstAttribute in paramAst.Attributes) { if (!(paramAstAttribute is AttributeAst paramAttributeAst)) { continue; }