@@ -39,6 +39,7 @@ If you have previous version of PSScriptAnalyzer installed on your machine, you
39
39
40
40
To confirm installation: run ``` Get-ScriptAnalyzerRule ``` in the PowerShell console to obtain the built-in rules
41
41
42
+
42
43
Suppressing Rules
43
44
=================
44
45
@@ -118,6 +119,7 @@ To match all functions/variables/parameters/objects, use `*` as the value of the
118
119
)
119
120
120
121
122
+
121
123
Profile support in ScriptAnalyzer
122
124
========================================
123
125
@@ -139,6 +141,32 @@ $myProfile = @{
139
141
Invoke-ScriptAnalyzer -path MyScript.ps1 -Profile $myProfile
140
142
```
141
143
144
+ ScriptAnalyzer as a .net library
145
+ ================================
146
+
147
+ ScriptAnalyzer engine and functionality can now be directly consumed as a library.
148
+
149
+ Here are the public interfaces:
150
+
151
+ ``` c#
152
+ using Microsoft .Windows .PowerShell .ScriptAnalyzer ;
153
+
154
+ public void Initialize (System .Management .Automation .Runspaces .Runspace runspace ,
155
+ Microsoft .Windows .PowerShell .ScriptAnalyzer .IOutputWriter outputWriter ,
156
+ [string [] customizedRulePath = null ],
157
+ [string [] includeRuleNames = null ],
158
+ [string [] excludeRuleNames = null ],
159
+ [string [] severity = null ],
160
+ [bool suppressedOnly = false ],
161
+ [string profile = null ])
162
+
163
+ public System .Collections .Generic .IEnumerable < DiagnosticRecord > AnalyzePath (string path ,
164
+ [bool searchRecursively = false ])
165
+
166
+ public System .Collections .Generic .IEnumerable < IRule > GetRule (string [] moduleNames ,
167
+ string [] ruleNames )
168
+ ```
169
+
142
170
143
171
Building the Code
144
172
=================
0 commit comments