Skip to content

Update namespace Powershell to PowerShell #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Engine/Commands/GetScriptAnalyzerRuleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
// THE SOFTWARE.
//

using Microsoft.PowerShell.Commands;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Management.Automation;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Commands
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
{
/// <summary>
/// GetScriptAnalyzerRuleCommand: Cmdlet to list all the analyzer rule names and descriptions.
Expand Down
9 changes: 2 additions & 7 deletions Engine/Commands/InvokeScriptAnalyzerCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,17 @@
//

using System.Text.RegularExpressions;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Language;
using System.Resources;
using System.Threading;
using System.Reflection;
using System.IO;
using System.Text;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Commands
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands
{
/// <summary>
/// InvokeScriptAnalyzerCommand: Cmdlet to statically check PowerShell scripts.
Expand Down
6 changes: 2 additions & 4 deletions Engine/Generic/AvoidCmdletGeneric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation.Language;

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

List<String> cmdletNameAndAliases = Microsoft.Windows.Powershell.ScriptAnalyzer.Helper.Instance.CmdletNameAndAliases(GetCmdletName());
List<String> cmdletNameAndAliases = Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper.Instance.CmdletNameAndAliases(GetCmdletName());

// Iterrates all CommandAsts and check the command name.
foreach (CommandAst cmdAst in commandAsts)
Expand Down
5 changes: 1 addition & 4 deletions Engine/Generic/AvoidParameterGeneric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an abstract class for rule that checks that
Expand Down
7 changes: 1 addition & 6 deletions Engine/Generic/DiagnosticRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents a result from a PSScriptAnalyzer rule.
Expand Down
7 changes: 1 addition & 6 deletions Engine/Generic/ExternalRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
internal class ExternalRule : IExternalRule
{
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/IDSCResourceRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using System.Collections.Generic;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an interface for a DSC rule that analyzes a DSC resource
Expand Down
7 changes: 1 addition & 6 deletions Engine/Generic/IExternalRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an interface for an external analyzer rule.
Expand Down
8 changes: 2 additions & 6 deletions Engine/Generic/ILogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// ILogger: An interface for a PSScriptAnalyzer logger to output the results of PSScriptAnalyzer rules.
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/IRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// THE SOFTWARE.
//

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// An interface for an analyzer rule that analyzes the Ast.
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/IScriptRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System.Threading.Tasks;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an interface for an analyzer rule that analyzes the Ast.
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/ITokenRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using System.Collections.Generic;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an interface for an analyzer rule that analyzes the tokens of a script.
Expand Down
7 changes: 1 addition & 6 deletions Engine/Generic/LoggerInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an internal class to properly display the name and description of a logger.
Expand Down
7 changes: 1 addition & 6 deletions Engine/Generic/RuleInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents an internal class to properly display the name and description of a rule.
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/RuleSeverity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// THE SOFTWARE.
//

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents the severity of a PSScriptAnalyzer rule
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/RuleSuppression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using System.Text.RegularExpressions;
using System.Globalization;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
///
Expand Down
4 changes: 1 addition & 3 deletions Engine/Generic/SkipNamedBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// This class extends AstVisitor2 and will skip any namedblockast and commandast
Expand Down
2 changes: 1 addition & 1 deletion Engine/Generic/SkipTypeDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using System.Collections.Generic;
using System.Management.Automation.Language;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// This class extends AstVisitor and will skip any typedefinitionast
Expand Down
8 changes: 1 addition & 7 deletions Engine/Generic/SourceType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@
// THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents a source name of a script analyzer rule.
Expand Down
18 changes: 12 additions & 6 deletions Engine/Generic/SuppressedRecord.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//
// Copyright (c) Microsoft Corporation.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Generic
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic
{
/// <summary>
/// Represents a suppressed diagnostic record
Expand Down
5 changes: 2 additions & 3 deletions Engine/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Language;
using System.Management.Automation.Runspaces;
using System.Globalization;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
{

/// <summary>
Expand Down
12 changes: 4 additions & 8 deletions Engine/Loggers/WriteObjectsLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;
using System.ComponentModel.Composition;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Threading;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer.Loggers
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Loggers
{
/// <summary>
/// WriteObjectsLogger: Logs Diagnostics though WriteObject.
Expand All @@ -34,7 +30,7 @@ public class WriteObjectsLogger : ILogger
#region Private members

private CultureInfo cul = Thread.CurrentThread.CurrentCulture;
private ResourceManager rm = new ResourceManager("Microsoft.Windows.Powershell.ScriptAnalyzer.Strings",
private ResourceManager rm = new ResourceManager("Microsoft.Windows.PowerShell.ScriptAnalyzer.Strings",
Assembly.GetExecutingAssembly());

#endregion
Expand Down
2 changes: 1 addition & 1 deletion Engine/PSScriptAnalyzer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Author = 'Microsoft Corporation'

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

# Version number of this module.
ModuleVersion = '1.0.1'
Expand Down
8 changes: 3 additions & 5 deletions Engine/ScriptAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
//

using System.Text.RegularExpressions;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Commands;
using Microsoft.Windows.Powershell.ScriptAnalyzer.Generic;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Commands;
using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
Expand All @@ -23,11 +23,9 @@
using System.Management.Automation.Language;
using System.Management.Automation.Runspaces;
using System.Reflection;
using System.Resources;
using System.Globalization;
using System.Threading;

namespace Microsoft.Windows.Powershell.ScriptAnalyzer
namespace Microsoft.Windows.PowerShell.ScriptAnalyzer
{
internal class ScriptAnalyzer
{
Expand Down
6 changes: 3 additions & 3 deletions Engine/ScriptAnalyzer.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<View>
<Name>PSScriptAnalyzerView</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.DiagnosticRecord</TypeName>
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.DiagnosticRecord</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -57,7 +57,7 @@
<View>
<Name>PSScriptAnalyzerView</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.SuppressedRecord</TypeName>
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.SuppressedRecord</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -110,7 +110,7 @@
<View>
<Name>ScriptAnalyzerRules</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Windows.Powershell.ScriptAnalyzer.Generic.RuleInfo</TypeName>
<TypeName>Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic.RuleInfo</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down
Loading