Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
raghushantha committed Sep 1, 2015
1 parent 5fa4d99 commit b00bfff
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ If you have previous version of PSScriptAnalyzer installed on your machine, you

To confirm installation: run ```Get-ScriptAnalyzerRule``` in the PowerShell console to obtain the built-in rules


Suppressing Rules
=================

Expand Down Expand Up @@ -118,6 +119,7 @@ To match all functions/variables/parameters/objects, use `*` as the value of the
)



Profile support in ScriptAnalyzer
========================================

Expand All @@ -139,6 +141,32 @@ $myProfile = @{
Invoke-ScriptAnalyzer -path MyScript.ps1 -Profile $myProfile
```

ScriptAnalyzer as a .net library
================================

ScriptAnalyzer engine and functionality can now be directly consumed as a library.

Here are the public interfaces:

```c#
using Microsoft.Windows.PowerShell.ScriptAnalyzer;

public void Initialize(System.Management.Automation.Runspaces.Runspace runspace,
Microsoft.Windows.PowerShell.ScriptAnalyzer.IOutputWriter outputWriter,
[string[] customizedRulePath = null],
[string[] includeRuleNames = null],
[string[] excludeRuleNames = null],
[string[] severity = null],
[bool suppressedOnly = false],
[string profile = null])

public System.Collections.Generic.IEnumerable<DiagnosticRecord> AnalyzePath(string path,
[bool searchRecursively = false])

public System.Collections.Generic.IEnumerable<IRule> GetRule(string[] moduleNames,
string[] ruleNames)
```


Building the Code
=================
Expand Down

0 comments on commit b00bfff

Please sign in to comment.