Skip to content

Commit 57ddda7

Browse files
author
Kapil Borle
committed
Fix compilation issue in Rules
1 parent 3b5ccfc commit 57ddda7

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Rules/AvoidUsingPlainTextForPassword.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
4747
// Iterates all ParamAsts and check if their names are on the list.
4848
foreach (ParameterAst paramAst in paramAsts)
4949
{
50-
TypeInfo paramType = (TypeInfo) paramAst.StaticType;
50+
Type paramType = paramAst.StaticType;
5151
bool hasPwd = false;
5252
String paramName = paramAst.Name.VariablePath.ToString();
5353

Rules/UseToExportFieldsInManifest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
using System.Management.Automation.Language;
1717
using System.Management.Automation;
1818
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
19-
using System.ComponentModel.Composition;
2019
#if !CORECLR
2120
using System.ComponentModel.Composition;
2221
#endif
2322
using System.Text.RegularExpressions;
2423
using System.Diagnostics;
2524
using System.Text;
25+
using System.Globalization;
2626

2727
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
2828
{

Tests/Rules/UseSingularNounsReservedVerbs.tests.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,27 @@ if (-not (Test-PSEditionCoreCLR))
3131
$nounViolations[0].Extent.Text | Should be "Verb-Files"
3232
}
3333
}
34-
}
3534

36-
Context "When function names have nouns from whitelist" {
35+
Context "When function names have nouns from whitelist" {
3736

38-
It "ignores function name ending with Data" {
39-
$nounViolationScript = @'
37+
It "ignores function name ending with Data" {
38+
$nounViolationScript = @'
4039
Function Add-SomeData
4140
{
4241
Write-Output "Adding some data"
4342
}
4443
'@
45-
Invoke-ScriptAnalyzer -ScriptDefinition $nounViolationScript `
46-
-IncludeRule "PSUseSingularNouns" `
47-
-OutVariable violations
48-
$violations.Count | Should Be 0
44+
Invoke-ScriptAnalyzer -ScriptDefinition $nounViolationScript `
45+
-IncludeRule "PSUseSingularNouns" `
46+
-OutVariable violations
47+
$violations.Count | Should Be 0
48+
}
4949
}
50-
}
5150

52-
Context "When there are no violations" {
53-
It "returns no violations" {
54-
$nounNoViolations.Count | Should Be 0
51+
Context "When there are no violations" {
52+
It "returns no violations" {
53+
$nounNoViolations.Count | Should Be 0
54+
}
5555
}
5656
}
5757
}

0 commit comments

Comments
 (0)