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 f722975 commit 5fa4d99
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,26 @@ To match all functions/variables/parameters/objects, use `*` as the value of the
)


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

Profiles that describe ScriptAnalyzer rules to include/exclude based on `Severity` can be created and supplied to `Invoke-ScriptAnalyzer` using the `-profile` parameter. This enables a user to create custom configuration for a specific environment.

Using Profile support:

```powershell
$myProfile = @{
Severity='Warning'
IncludeRules=@('PSAvoidUsingCmdletAliases',
'PSAvoidUsingPositionalParameters',
'PSAvoidUsingInternalURLs'
'PSAvoidUninitializedVariable')
ExcludeRules=@('PSAvoidUsingCmdletAliases'
'PSAvoidUninitializedVariable')
}
Invoke-ScriptAnalyzer -path MyScript.ps1 -Profile $myProfile
```


Building the Code
Expand Down

0 comments on commit 5fa4d99

Please sign in to comment.