You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Table of Contents
32
32
33
33
<!-- tocstop -->
34
34
35
-
Introduction
35
+
Introduction[↑](#table-of-contents)
36
36
============
37
37
PSScriptAnalyzer is a static code checker for Windows PowerShell modules and scripts. PSScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules.
38
38
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
@@ -41,15 +41,16 @@ code defects and suggests possible solutions for improvements.
41
41
PSScriptAnalyzer 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,
42
42
usage of Invoke-Expression etc. Additional functionalities such as exclude/include specific rules are also supported.
@@ -134,7 +135,7 @@ cd /path/to/PSScriptAnalyzer/Tests/Rules
134
135
Invoke-Pester
135
136
```
136
137
137
-
Suppressing Rules
138
+
Suppressing Rules[↑](#table-of-contents)
138
139
=================
139
140
140
141
You can suppress a rule by decorating a script/function or script/function parameter with .NET's [SuppressMessageAttribute](https://msdn.microsoft.com/en-us/library/system.diagnostics.codeanalysis.suppressmessageattribute.aspx).
@@ -219,7 +220,7 @@ Param()
219
220
220
221
**Note**: Rule suppression is currently supported only for built-in rules.
221
222
222
-
Settings Support in ScriptAnalyzer
223
+
Settings Support in ScriptAnalyzer[↑](#table-of-contents)
223
224
========================================
224
225
Settings that describe ScriptAnalyzer rules to include/exclude based on `Severity` can be created and supplied to
225
226
`Invoke-ScriptAnalyzer` using the `Setting` parameter. This enables a user to create a custom configuration for a specific environment. We support the following modes for specifying the settings file.
Note that providing settings explicitly takes higher precedence over this implicit mode. Sample settings files are provided [here](https://github.com/PowerShell/PSScriptAnalyzer/tree/master/Engine/Settings).
270
271
271
-
ScriptAnalyzer as a .NET library
272
+
ScriptAnalyzer as a .NET library[↑](#table-of-contents)
272
273
================================
273
274
274
275
ScriptAnalyzer engine and functionality can now be directly consumed as a library.
@@ -292,7 +293,7 @@ public System.Collections.Generic.IEnumerable<DiagnosticRecord> AnalyzePath(stri
Contributing to ScriptAnalyzer[↑](#table-of-contents)
356
357
==============================
357
358
You are welcome to contribute to this project. There are many ways to contribute:
358
359
@@ -373,6 +374,6 @@ You might also read these two blog posts about contributing code: [Open Source C
373
374
374
375
Before submitting a feature or substantial code contribution, please discuss it with the Windows PowerShell team via [Issues](https://github.com/PowerShell/PSScriptAnalyzer/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.
375
376
376
-
Code of Conduct
377
+
Code of Conduct[↑](#table-of-contents)
377
378
===============
378
379
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
0 commit comments