Skip to content

Commit c1de26c

Browse files
author
Kapil Borle
committed
Merge pull request #540 from PowerShell/ChangeDscSwitchName
Change switch name from SaveDscResourceDependency to SaveDscDependency
2 parents e1e70e7 + 168e266 commit c1de26c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

CHANGELOG.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- This property emits text that can rectify the violation which triggered the rule.
66
- The primary purpose of this feature is to enable quick-fix scenarios in editors (e.g. vscode)
77
- Add "Name" as a positional parameter in Get-ScriptAnalyzerRule
8-
- Add a `SaveDSCResourceDependency` switch to allow `Invoke-ScriptAnalyzer` to download a DSC Resource module from PSGallery in the event of a `ModuleNotFoundDuringParse` parse error.
8+
- Add a `SaveDscDependency` switch to allow `Invoke-ScriptAnalyzer` to download a DSC Resource module from PSGallery in the event of a `ModuleNotFoundDuringParse` parse error.
99
- Add `remove` verb to `UseShouldProcessForStateChangingFunctions` rule
1010
- Add a `ScriptPath` property to Diagnostic Record that returns the full path of the script
1111
- Fix the parsing of `Settings` parameter value when a hashtable is given

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ public object Settings
194194
/// Resolve DSC resource dependency
195195
/// </summary>
196196
[Parameter(Mandatory = false)]
197-
public SwitchParameter SaveDscResourceDependency
197+
public SwitchParameter SaveDscDependency
198198
{
199-
get { return saveDscResourceDependency; }
200-
set { saveDscResourceDependency = value; }
199+
get { return saveDscDependency; }
200+
set { saveDscDependency = value; }
201201
}
202-
private bool saveDscResourceDependency;
202+
private bool saveDscDependency;
203203
#endif // !PSV3
204204
#endregion Parameters
205205

@@ -242,7 +242,7 @@ protected override void ProcessRecord()
242242

243243
#if !PSV3
244244
// TODO Support dependency resolution for analyzing script definitions
245-
if (saveDscResourceDependency)
245+
if (saveDscDependency)
246246
{
247247
using (var rsp = RunspaceFactory.CreateRunspace())
248248
{

Tests/Engine/InvokeScriptAnalyzer.tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ Describe "Test available parameters" {
7171

7272
if (!$testingLibraryUsage)
7373
{
74-
Context "SaveDSCResourceDependency parameter" {
74+
Context "SaveDscDependency parameter" {
7575
It "has the parameter" {
76-
$params.ContainsKey("SaveDscResourceDependency") | Should Be $true
76+
$params.ContainsKey("SaveDscDependency") | Should Be $true
7777
}
7878

7979
It "is a switch parameter" {
80-
$params["SaveDscResourceDependency"].ParameterType.FullName | Should Be "System.Management.Automation.SwitchParameter"
80+
$params["SaveDscDependency"].ParameterType.FullName | Should Be "System.Management.Automation.SwitchParameter"
8181
}
8282
}
8383
}

0 commit comments

Comments
 (0)