Skip to content

Commit f09842a

Browse files
author
Quoc Truong
committed
Merge pull request #369 from PowerShell/AddExampleConfiguration
Give profile alias configuration and provide some sample configurations
2 parents e305f8e + dc6c18f commit f09842a

File tree

7 files changed

+39
-0
lines changed

7 files changed

+39
-0
lines changed

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public SwitchParameter SuppressedOnly
159159
/// <summary>
160160
/// Returns path to the file that contains user profile for ScriptAnalyzer
161161
/// </summary>
162+
[Alias("Configuration")]
162163
[Parameter(Mandatory = false)]
163164
[ValidateNotNull]
164165
public string Profile
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@{
2+
IncludeRules=@('PSUseApprovedVerbs',
3+
'PSReservedCmdletChar',
4+
'PSReservedParams',
5+
'PSShouldProcess',
6+
'PSUseShouldProcessForStateChangingFunctions',
7+
'PSUseSingularNouns',
8+
'PSMissingModuleManifestField',
9+
'PSAvoidDefaultValueSwitchParameter')
10+
}

Engine/Configurations/DSC.psd1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@{
2+
IncludeRules=@('PSDSC*')
3+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@{
2+
IncludeRules=@('PSAvoidUsingCmdletAliases',
3+
'PSAvoidUsingWMICmdlet',
4+
'PSAvoidUsingEmptyCatchBlock',
5+
'PSUseCmdletCorrectly',
6+
'PSUseShouldProcessForStateChangingFunctions',
7+
'PSAvoidUsingPositionalParameters',
8+
'PSAvoidGlobalVars',
9+
'PSUseDeclaredVarsMoreThanAssignments',
10+
'PSAvoidUsingInvokeExpression')
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@{
2+
IncludeRules=@('PSAvoidUsingPlainTextForPassword',
3+
'PSAvoidUsingComputerNameHardcoded',
4+
'PSAvoidUsingConvertToSecureStringWithPlainText',
5+
'PSUsePSCredentialType',
6+
'PSAvoidUsingUserNameAndPasswordParams',
7+
'PSAvoidUsingFilePath')
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@{
2+
IncludeRules=@('PSProvideCommentHelp',
3+
'PSAvoidUsingWriteHost')
4+
}

Engine/ScriptAnalyzerEngine.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
<PostBuildEvent>mkdir "$(SolutionDir)$(SolutionName)"
105105
copy /y "$(ProjectDir)\*.ps1xml" "$(SolutionDir)$(SolutionName)"
106106
copy /y "$(ProjectDir)\*.psd1" "$(SolutionDir)$(SolutionName)"
107+
mkdir "$(SolutionDir)$(SolutionName)\Configurations"
108+
copy /y "$(ProjectDir)\Configurations\*.psd1" "$(SolutionDir)$(SolutionName)\Configurations"
107109
copy /y "$(TargetPath)" "$(SolutionDir)$(SolutionName)"
108110
mkdir "$(SolutionDir)$(SolutionName)\en-US"
109111
copy /y "$(ProjectDir)\about_*.help.txt" "$(SolutionDir)$(SolutionName)\en-US"

0 commit comments

Comments
 (0)