Skip to content

Commit f01eceb

Browse files
committed
Converted to GFM
Reworked everything from HTML to GFM. Should be easier to maintain going forward.
1 parent 3a8afdd commit f01eceb

File tree

1 file changed

+52
-90
lines changed

1 file changed

+52
-90
lines changed

README.md

Lines changed: 52 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,73 @@
1-
<html>
2-
<head>
3-
<title></title>
4-
</head>
5-
<body>
6-
<p><strong>Introduction</strong></p>
1+
Introduction
2+
============
73

8-
<p>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.</p>
4+
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.
95

10-
<p>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.</p>
6+
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.
117

12-
<p>&nbsp;</p>
8+
ScriptAnalyzer cmdlets
9+
======================
10+
```
11+
Get-ScriptAnalyzerRule [-CustomizedRulePath <string[]>] [-Name <string[]>] [<CommonParameters>]
1312
14-
<p><strong>ScriptAnalyzer cmdlets:</strong></p>
13+
Invoke-ScriptAnalyzer [-Path] <string> [-CustomizedRulePath <string[]>] [-ExcludeRule <string[]>] [-IncludeRule <string[]>] [-Severity <string[]>] [-Recurse] [<CommonParameters>]
14+
```
1515

16-
<p>Get-ScriptAnalyzerRule &nbsp;[-CustomizedRulePath &lt;string[]&gt;]<br />
17-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[-Name &lt;string[]&gt;]<br />
18-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[&lt;CommonParameters&gt;]</p>
16+
Requirements
17+
============
1918

20-
<p><br />
21-
Invoke-ScriptAnalyzer [-Path] &lt;string&gt; [-CustomizedRulePath &lt;string[]&gt;]&nbsp;<br />
22-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-ExcludeRule &lt;string[]&gt;]&nbsp;<br />
23-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-IncludeRule &lt;string[]&gt;]&nbsp;<br />
24-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-Severity &lt;string[]&gt;]&nbsp;<br />
25-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [-Recurse]&nbsp;<br />
26-
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [&lt;CommonParameters&gt;]</p>
19+
WS2012R2 / Windows 8.1 / Windows OS running PowerShell v5.0 which can be obtained using [Windows Management Framework 5.0 Preview February 2015](http://go.microsoft.com/fwlink/?LinkId=398175).
2720

28-
<p>&nbsp;</p>
21+
Installation
22+
============
2923

30-
<p>&nbsp;</p>
24+
1. Build the Code using Visual Studio
3125

32-
<p><strong>Requirements</strong></p>
26+
2. Copy following files to ```$env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer```
3327

34-
<p>WS2012R2 / Windows 8.1 / Windows OS containing PowerShell v5.0 which can be obtained using Windows Management Framework 5.0 Preview February 2015.</p>
28+
3. In PowerShell Console:
29+
```powershell
30+
Import-Module $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer\PSScriptAnalyzer.psd1
31+
```
3532

36-
<p>&nbsp;</p>
33+
To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell console to obtain the built-in rules
3734

38-
<p><strong>Installation</strong></p>
35+
Building the Code
36+
=================
3937

40-
<p>1) &nbsp; &nbsp; &nbsp;Build the Code using Visual Studio</p>
38+
Use Visual Studio or any C# compiler to build the code
4139

42-
<p>2) &nbsp; &nbsp; &nbsp;Copy following files to $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer</p>
40+
Running Tests
41+
=============
4342

44-
<p>3) &nbsp; &nbsp; &nbsp;In PowerShell Console :<br />
45-
Import-Module $env:ProgramFiles\WindowsPowerShell\Modules\ScriptAnalyzer\PSScriptAnalyzer.psd1</p>
43+
Pester-based ScriptAnalyzer Tests are located in ```<branch>/ScriptAnalyzer/Tests``` folder
4644

47-
<p>To confirm installation:</p>
45+
* Ensure Pester is installed on the machine
46+
* Go the Tests folder in your local repository
47+
* Run Engine Tests:
48+
.\InvokeScriptAnalyzer.tests.ps1
49+
* Run Tests for Built-in rules:
50+
.\*.ps1 (Example - .\ AvoidConvertToSecureStringWithPlainText.ps1)
51+
4852

49-
<p>&middot; &nbsp; &nbsp; &nbsp; &nbsp; Run Get-ScriptAnalyzerRule in the PowerShell console to obtain the built-in rules</p>
53+
Contributing to ScriptAnalyzer
54+
==============================
5055

51-
<p>&nbsp;</p>
56+
You are welcome to contribute to this project. There are many ways to contribute:
5257

53-
<p><br />
54-
<strong>Building the Code</strong></p>
58+
1. Submit a bug report via [Issues]( https://github.com/PowerShell/ScriptAnalyzer/issues). For a guide to submitting good bug reports, please read [Painless Bug Tracking](http://www.joelonsoftware.com/articles/fog0000000029.html).
59+
2. Verify fixes for bugs.
60+
3. Submit your fixes for a bug. Before submitting, please make sure you have:
61+
* Performed code reviews of your own
62+
* Updated the test cases if needed
63+
* Run the test cases to ensure no feature breaks or test breaks
64+
* Added the test cases for new code
65+
4. Submit a feature request.
66+
5. Help answer questions in the discussions list.
67+
6. Submit test cases.
68+
7. Tell others about the project.
69+
8. Tell the developers how much you appreciate the product!
5570

56-
<p>Use Visual Studio or any C# compiler to build the code</p>
71+
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.
5772

58-
<p>&nbsp;</p>
59-
60-
<p><br />
61-
<strong>Running Tests</strong></p>
62-
63-
<p>Pester based ScriptAnalyzer Tests are located in &ldquo;&lt;branch&gt;/ScriptAnalyzer/Tests&rdquo; folder</p>
64-
65-
<ul>
66-
<li>Ensure Pester is installed on the machine</li>
67-
<li>Go the Tests folder in your local repository</li>
68-
<li>Run Engine Tests:
69-
<ul>
70-
<li>.\InvokeScriptAnalyzer.tests.ps1</li>
71-
</ul>
72-
</li>
73-
<li>Run Tests for Built-in rules:
74-
<ul>
75-
<li>.\*.ps1 (Example - .\ AvoidConvertToSecureStringWithPlainText.ps1)<br />
76-
&nbsp;</li>
77-
</ul>
78-
</li>
79-
</ul>
80-
81-
<p><br />
82-
<strong>Contributing to ScriptAnalyzer</strong></p>
83-
84-
<p>You are welcome to contribute to this project. There are many ways to contribute:</p>
85-
86-
<ul>
87-
<li>Submit a bug report via Issues. For a guide to submitting good bug reports, please read Painless Bug Tracking.</li>
88-
<li>Verify fixes for bugs.</li>
89-
<li>Submit your fixes for a bug. Before submitting, please make sure you have:
90-
<ul>
91-
<li>Performed code reviews of your own</li>
92-
<li>Updated the test cases if needed</li>
93-
<li>Run the test cases to ensure no feature breaks or test breaks</li>
94-
<li>Added the test cases for new code</li>
95-
</ul>
96-
</li>
97-
<li>Submit a feature request.</li>
98-
<li>Help answer questions in the discussions list.</li>
99-
<li>Submit test cases.</li>
100-
<li>Tell others about the project.</li>
101-
<li>Tell the developers how much you appreciate the product!</li>
102-
</ul>
103-
104-
<p><br />
105-
You might also read these two blog posts about contributing code: Open Source Contribution Etiquette by Miguel de Icaza, and Don&rsquo;t &ldquo;Push&rdquo; Your Pull Requests by Ilya Grigorik.</p>
106-
107-
<p>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.</p>
108-
109-
<p>&nbsp;</p>
110-
</body>
111-
</html>
73+
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.

0 commit comments

Comments
 (0)