Skip to content

Commit b10fb39

Browse files
committed
Merge pull request #221 from PowerShell/NameSpaceChanges
Update namespace Powershell to PowerShell
2 parents 1e2be1e + 2aaa17e commit b10fb39

File tree

73 files changed

+146
-324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+146
-324
lines changed

Engine/Commands/GetScriptAnalyzerRuleCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using Microsoft.PowerShell.Commands;
14-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
1513
using System;
1614
using System.Collections.Generic;
1715
using System.Diagnostics.CodeAnalysis;
1816
using System.Globalization;
1917
using System.Linq;
2018
using System.Management.Automation;
19+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
2120

22-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Commands
21+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
2322
{
2423
/// <summary>
2524
/// GetScriptAnalyzerRuleCommand: Cmdlet to list all the analyzer rule names and descriptions.

Engine/Commands/InvokeScriptAnalyzerCommand.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,17 @@
1111
//
1212

1313
using System.Text.RegularExpressions;
14-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
1514
using System;
1615
using System.Collections.Generic;
17-
using System.ComponentModel.Composition;
1816
using System.Diagnostics.CodeAnalysis;
1917
using System.Globalization;
2018
using System.Linq;
2119
using System.Management.Automation;
2220
using System.Management.Automation.Language;
23-
using System.Resources;
24-
using System.Threading;
25-
using System.Reflection;
2621
using System.IO;
27-
using System.Text;
22+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
2823

29-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Commands
24+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
3025
{
3126
/// <summary>
3227
/// InvokeScriptAnalyzerCommand: Cmdlet to statically check PowerShell scripts.

Engine/Generic/AvoidCmdletGeneric.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
using System;
1414
using System.Collections.Generic;
1515
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1816
using System.Management.Automation.Language;
1917

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
18+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2119
{
2220
/// <summary>
2321
/// Represents an abstract class for rule that checks whether the script
@@ -38,7 +36,7 @@ public IEnumerable<DiagnosticRecord> AnalyzeScript(Ast ast, string fileName)
3836
// Finds all CommandAsts.
3937
IEnumerable<Ast> commandAsts = ast.FindAll(testAst => testAst is CommandAst, true);
4038

41-
List<String> cmdletNameAndAliases = Microsoft.Windows.Powershell.ScriptAnalyzer.Helper.Instance.CmdletNameAndAliases(GetCmdletName());
39+
List<String> cmdletNameAndAliases = Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper.Instance.CmdletNameAndAliases(GetCmdletName());
4240

4341
// Iterrates all CommandAsts and check the command name.
4442
foreach (CommandAst cmdAst in commandAsts)

Engine/Generic/AvoidParameterGeneric.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@
1212

1313
using System;
1414
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1815
using System.Management.Automation.Language;
1916

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
17+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2118
{
2219
/// <summary>
2320
/// Represents an abstract class for rule that checks that

Engine/Generic/DiagnosticRecord.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1813
using System.Management.Automation.Language;
1914

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
15+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2116
{
2217
/// <summary>
2318
/// Represents a result from a PSScriptAnalyzer rule.

Engine/Generic/ExternalRule.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1813

19-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
14+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2015
{
2116
internal class ExternalRule : IExternalRule
2217
{

Engine/Generic/IDSCResourceRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using System.Collections.Generic;
1414
using System.Management.Automation.Language;
1515

16-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
16+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1717
{
1818
/// <summary>
1919
/// Represents an interface for a DSC rule that analyzes a DSC resource

Engine/Generic/IExternalRule.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1813

19-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
14+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2015
{
2116
/// <summary>
2217
/// Represents an interface for an external analyzer rule.

Engine/Generic/ILogger.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@
1111
//
1212

1313
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
18-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
14+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;
1915

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
16+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2117
{
2218
/// <summary>
2319
/// ILogger: An interface for a PSScriptAnalyzer logger to output the results of PSScriptAnalyzer rules.

Engine/Generic/IRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
13+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1414
{
1515
/// <summary>
1616
/// An interface for an analyzer rule that analyzes the Ast.

Engine/Generic/IScriptRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Threading.Tasks;
1818
using System.Management.Automation.Language;
1919

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
20+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2121
{
2222
/// <summary>
2323
/// Represents an interface for an analyzer rule that analyzes the Ast.

Engine/Generic/ITokenRule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using System.Collections.Generic;
1414
using System.Management.Automation.Language;
1515

16-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
16+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1717
{
1818
/// <summary>
1919
/// Represents an interface for an analyzer rule that analyzes the tokens of a script.

Engine/Generic/LoggerInfo.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1813
using System.Diagnostics.CodeAnalysis;
1914

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
15+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2116
{
2217
/// <summary>
2318
/// Represents an internal class to properly display the name and description of a logger.

Engine/Generic/RuleInfo.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1813
using System.Diagnostics.CodeAnalysis;
1914

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
15+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2116
{
2217
/// <summary>
2318
/// Represents an internal class to properly display the name and description of a rule.

Engine/Generic/RuleSeverity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
13+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1414
{
1515
/// <summary>
1616
/// Represents the severity of a PSScriptAnalyzer rule

Engine/Generic/RuleSuppression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.Text.RegularExpressions;
1818
using System.Globalization;
1919

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
20+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2121
{
2222
/// <summary>
2323
///

Engine/Generic/SkipNamedBlock.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
using System;
1414
using System.Collections.Generic;
1515
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
1816
using System.Management.Automation.Language;
1917

20-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
18+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2119
{
2220
/// <summary>
2321
/// This class extends AstVisitor2 and will skip any namedblockast and commandast

Engine/Generic/SkipTypeDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
using System.Collections.Generic;
1414
using System.Management.Automation.Language;
1515

16-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
16+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
1717
{
1818
/// <summary>
1919
/// This class extends AstVisitor and will skip any typedefinitionast

Engine/Generic/SourceType.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@
1010
// THE SOFTWARE.
1111
//
1212

13-
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
18-
19-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
13+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
2014
{
2115
/// <summary>
2216
/// Represents a source name of a script analyzer rule.

Engine/Generic/SuppressedRecord.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
//
2+
// Copyright (c) Microsoft Corporation.
3+
//
4+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10+
// THE SOFTWARE.
11+
//
612

7-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
13+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
814
{
915
/// <summary>
1016
/// Represents a suppressed diagnostic record

Engine/Helper.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
using System.Linq;
1717
using System.Management.Automation;
1818
using System.Management.Automation.Language;
19-
using System.Management.Automation.Runspaces;
2019
using System.Globalization;
21-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
20+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
2221

23-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer
22+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
2423
{
2524

2625
/// <summary>

Engine/Loggers/WriteObjectsLogger.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@
1111
//
1212

1313
using System;
14-
using System.Collections.Generic;
15-
using System.Linq;
16-
using System.Text;
17-
using System.Threading.Tasks;
18-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
19-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
14+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
15+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;
2016
using System.ComponentModel.Composition;
2117
using System.Globalization;
2218
using System.Reflection;
2319
using System.Resources;
2420
using System.Threading;
2521

26-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Loggers
22+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Loggers
2723
{
2824
/// <summary>
2925
/// WriteObjectsLogger: Logs Diagnostics though WriteObject.
@@ -34,7 +30,7 @@ public class WriteObjectsLogger : ILogger
3430
#region Private members
3531

3632
private CultureInfo cul = Thread.CurrentThread.CurrentCulture;
37-
private ResourceManager rm = new ResourceManager("Microsoft.Windows.Powershell.ScriptAnalyzer.Strings",
33+
private ResourceManager rm = new ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.Strings",
3834
Assembly.GetExecutingAssembly());
3935

4036
#endregion

Engine/PSScriptAnalyzer.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Author = 'Microsoft Corporation'
99

1010
# Script module or binary module file associated with this manifest.
11-
RootModule = 'Microsoft.Windows.Powershell.ScriptAnalyzer.dll'
11+
RootModule = 'Microsoft.Windows.PowerShell.ScriptAnalyzer.dll'
1212

1313
# Version number of this module.
1414
ModuleVersion = '1.0.1'

Engine/ScriptAnalyzer.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//
1212

1313
using System.Text.RegularExpressions;
14-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
15-
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
14+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;
15+
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
1616
using System;
1717
using System.Collections.Generic;
1818
using System.ComponentModel.Composition;
@@ -23,11 +23,9 @@
2323
using System.Management.Automation.Language;
2424
using System.Management.Automation.Runspaces;
2525
using System.Reflection;
26-
using System.Resources;
2726
using System.Globalization;
28-
using System.Threading;
2927

30-
namespace Microsoft.Windows.Powershell.ScriptAnalyzer
28+
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
3129
{
3230
internal class ScriptAnalyzer
3331
{

Engine/ScriptAnalyzer.format.ps1xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<View>
55
<Name>PSScriptAnalyzerView</Name>
66
<ViewSelectedBy>
7-
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord</TypeName>
7+
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord</TypeName>
88
</ViewSelectedBy>
99
<TableControl>
1010
<TableHeaders>
@@ -57,7 +57,7 @@
5757
<View>
5858
<Name>PSScriptAnalyzerView</Name>
5959
<ViewSelectedBy>
60-
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.SuppressedRecord</TypeName>
60+
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.SuppressedRecord</TypeName>
6161
</ViewSelectedBy>
6262
<TableControl>
6363
<TableHeaders>
@@ -110,7 +110,7 @@
110110
<View>
111111
<Name>ScriptAnalyzerRules</Name>
112112
<ViewSelectedBy>
113-
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.RuleInfo</TypeName>
113+
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.RuleInfo</TypeName>
114114
</ViewSelectedBy>
115115
<TableControl>
116116
<TableHeaders>

0 commit comments

Comments
 (0)