Skip to content

Commit 2371d67

Browse files
jayvdbMathieuBuisson
authored andcommitted
Remove trailing whitespace (#7)
1 parent 2a561f1 commit 2371d67

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed
-104 Bytes
Binary file not shown.

CustomPSScriptAnalyzerRules/MBAnalyzerRules.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Function Measure-PascalCase {
6565
$Result = New-Object `
6666
-Typename "Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord" `
6767
-ArgumentList "$((Get-Help $MyInvocation.MyCommand.Name).Description.Text)",$Violation.Extent,$PSCmdlet.MyInvocation.InvocationName,Information,$Null
68-
68+
6969
$Results += $Result
7070
}
7171
}

Merge-DscConfigData/Merge-DscConfigData.psm1

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#Requires -Version 4
22
Function Merge-DscConfigData {
33
[CmdletBinding()]
4-
4+
55
Param(
66
[Parameter(Mandatory=$True,Position=0)]
77
[string]$BaseConfigFilePath,
@@ -36,26 +36,26 @@ Function Merge-DscConfigData {
3636

3737
# Proceeding with the merge only if $OverrideConfig is not null and has been evaluated as a hashtable
3838
If ( $OverrideConfig -and ($OverrideConfig -is [hashtable]) ) {
39-
39+
4040
#Casting the AllNodes array to a list in order to add elements to it
4141
$BaseNodes = $BaseConfig.AllNodes -as [System.Collections.ArrayList]
42-
42+
4343
Foreach ( $Node in $OverrideConfig.AllNodes ) {
44-
44+
4545
$NodeInBaseConfig = $BaseNodes | Where-Object { $_.NodeName -eq $Node.NodeName }
4646

4747
If ( $NodeInBaseConfig ) {
48-
48+
4949
Write-Verbose "The node $($Node.NodeName) is already present in the base config."
5050

5151
# Removing the NodeName entry from the current Node to keep only the actual settings
5252
$Node.Remove('NodeName')
5353

5454
Foreach ($OverrideSettingKey in $Node.keys) {
55-
55+
5656
# Checking if the setting already exists in the Base config
5757
$KeyExistsInBaseNode = $NodeInBaseConfig.ContainsKey($OverrideSettingKey)
58-
58+
5959
If ( $KeyExistsInBaseNode ) {
6060
Write-Verbose "$($NodeInBaseConfig.NodeName).$OverrideSettingKey, in node $($NodeInBaseConfig.NodeName) is present in the base config, overriding its value."
6161
$NodeInBaseConfig.$($OverrideSettingKey) = $Node.$($OverrideSettingKey)
@@ -67,7 +67,7 @@ Function Merge-DscConfigData {
6767
}
6868
}
6969
Else { # If the node is not already present in the base base config
70-
70+
7171
Write-Verbose "The node $($Node.NodeName) is absent in the base config, adding it."
7272
$Null = $BaseNodes.Add($Node)
7373
}
@@ -78,21 +78,21 @@ Function Merge-DscConfigData {
7878
if ($OverrideConfig.NonNodeData -ne $null) {
7979

8080
if ($BaseConfig.NonNodeData -eq $null) {
81-
81+
8282
# Use NonNodeData, in its entirety, from the Override configuration if NonNodeData does not exist in the Base configuration
8383
$BaseConfig.NonNodeData = $OverrideConfig.NonNodeData
8484

8585
} else {
8686

8787
foreach ($NonNodeSetting in $OverrideConfig.NonNodeData.GetEnumerator()) {
88-
88+
8989
# Checking if the setting already exists in the Base config
9090
if ($BaseConfig.NonNodeData.ContainsKey($NonNodeSetting.name))
9191
{
9292
Write-Verbose -Message "The setting $($NonNodeSetting.name) is present in the base config, overring its value."
9393
$BaseConfig.NonNodeData.Set_Item($NonNodeSetting.Name, $NonNodeSetting.value)
9494
}
95-
else
95+
else
9696
{
9797
Write-Verbose -Message "The setting $($NonNodeSetting.name) is absent in the base config, ading it."
9898
$BaseConfig.NonNodeData.Add($NonNodeSetting.Name, $NonNodeSetting.value)

0 commit comments

Comments
 (0)