@@ -39,6 +39,7 @@ If you have previous version of PSScriptAnalyzer installed on your machine, you
3939
4040To confirm installation: run ``` Get-ScriptAnalyzerRule ``` in the PowerShell console to obtain the built-in rules
4141
42+
4243Suppressing Rules
4344=================
4445
@@ -118,6 +119,7 @@ To match all functions/variables/parameters/objects, use `*` as the value of the
118119 )
119120
120121
122+
121123Profile support in ScriptAnalyzer
122124========================================
123125
@@ -139,6 +141,32 @@ $myProfile = @{
139141Invoke-ScriptAnalyzer -path MyScript.ps1 -Profile $myProfile
140142```
141143
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+
142170
143171Building the Code
144172=================
0 commit comments