diff --git a/README.md b/README.md index 98b38005d..9ebd7531c 100644 --- a/README.md +++ b/README.md @@ -1,111 +1,73 @@ - -
-Introduction
+Introduction +============ -ScriptAnalyzer is a static code checker for Windows PowerShell modules and scripts. ScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements.
+ScriptAnalyzer is a static code checker for Windows PowerShell modules and scripts. ScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements. -ScriptAnalyzer is shipped with a collection of built-in rules that checks various aspects of PowerShell code such as presence of uninitialized variables, usage of PSCredential Type, usage of Invoke-Expression etc. Additional functionalities such as exclude/include specific rules are also supported.
+ScriptAnalyzer is shipped with a collection of built-in rules that checks various aspects of PowerShell code such as presence of uninitialized variables, usage of PSCredential Type, usage of Invoke-Expression etc. Additional functionalities such as exclude/include specific rules are also supported. -+ScriptAnalyzer cmdlets +====================== +``` +Get-ScriptAnalyzerRule [-CustomizedRulePath
ScriptAnalyzer cmdlets:
+Invoke-ScriptAnalyzer [-Path]Get-ScriptAnalyzerRule [-CustomizedRulePath <string[]>]
- [-Name <string[]>]
- [<CommonParameters>]
-Invoke-ScriptAnalyzer [-Path] <string> [-CustomizedRulePath <string[]>]
- [-ExcludeRule <string[]>]
- [-IncludeRule <string[]>]
- [-Severity <string[]>]
- [-Recurse]
- [<CommonParameters>]
+Installation +============ -
+1. Build the Code using Visual Studio -
Requirements
+2. Copy following files to ```$env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer``` -WS2012R2 / Windows 8.1 / Windows OS containing PowerShell v5.0 which can be obtained using Windows Management Framework 5.0 Preview February 2015.
+3. In PowerShell Console: +```powershell +Import-Module $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer\PSScriptAnalyzer.psd1 +``` -+To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell console to obtain the built-in rules -
Installation
+Building the Code +================= -1) Build the Code using Visual Studio
+Use Visual Studio or any C# compiler to build the code -2) Copy following files to $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer
+Running Tests +============= -3) In PowerShell Console :
-Import-Module $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer\PSScriptAnalyzer.psd1
To confirm installation:
+* Ensure Pester is installed on the machine +* Go the Tests folder in your local repository +* Run Engine Tests: +.\InvokeScriptAnalyzer.tests.ps1 +* Run Tests for Built-in rules: +.\*.ps1 (Example - .\ AvoidConvertToSecureStringWithPlainText.ps1) + -· Run Get-ScriptAnalyzerRule in the PowerShell console to obtain the built-in rules
+Contributing to ScriptAnalyzer +============================== -+You are welcome to contribute to this project. There are many ways to contribute: -
-Building the Code
Use Visual Studio or any C# compiler to build the code
+You might also read these two blog posts about contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza, and [Don’t “Push” Your Pull Requests](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. -- -
-Running Tests
Pester based ScriptAnalyzer Tests are located in “<branch>/ScriptAnalyzer/Tests” folder
- -
-Contributing to ScriptAnalyzer
You are welcome to contribute to this project. There are many ways to contribute:
- -
-You might also read these two blog posts about contributing code: Open Source Contribution Etiquette by Miguel de Icaza, and Don’t “Push” Your Pull Requests by Ilya Grigorik.
Before submitting a feature or substantial code contribution, please discuss it with the Windows PowerShell team via Issues, and ensure it follows the product roadmap. Note that all code submissions will be rigorously reviewed by the Windows PowerShell Team. Only those that meet a high bar for both quality and roadmap fit will be merged into the source.
- -- - +Before submitting a feature or substantial code contribution, please discuss it with the Windows PowerShell team via [Issues](https://github.com/PowerShell/ScriptAnalyzer/issues), and ensure it follows the product roadmap. Note that all code submissions will be rigorously reviewed by the Windows PowerShell Team. Only those that meet a high bar for both quality and roadmap fit will be merged into the source.