Skip to content

Allow for suppression of custom rules - #1145

Merged
Christoph Bergmeister (bergmeister) merged 6 commits into
PowerShell:developmentfrom
bergmeister:CustomRules_Suppression
Mar 5, 2019
Merged

Allow for suppression of custom rules#1145
Christoph Bergmeister (bergmeister) merged 6 commits into
PowerShell:developmentfrom
bergmeister:CustomRules_Suppression

Conversation

@bergmeister

@bergmeister Christoph Bergmeister (bergmeister) commented Feb 21, 2019

Copy link
Copy Markdown
Collaborator

PR Summary

PR Checklist

…oid breaking existing functionality, therefore also revert the last change in test file
…uppressing custom rules when there is no Extent supplied
@bergmeister
Christoph Bergmeister (bergmeister) marked this pull request as ready for review February 24, 2019 15:37
@bergmeister Christoph Bergmeister (bergmeister) added the (Re-)Review Needed Feedback has been addressed during PR stage or is required in the first place. label Feb 24, 2019
@bergmeister
Christoph Bergmeister (bergmeister) merged commit b2ae082 into PowerShell:development Mar 5, 2019
Christoph Bergmeister (bergmeister) added a commit to bergmeister/PSScriptAnalyzer that referenced this pull request Mar 22, 2019
* Fix rule name lookup mismatch for custom rules to allow for suppresion and unify code

* Remove note that custom rules suppression are not supported

* fix CustomizedRule.tests.ps1

* do not change GetName method and add GetFullName method instead to avoid breaking existing functionality, therefore also revert the last change in test file

* Add test and fix dummy test rule to return script extent. TODO: Fix suppressing custom rules when there is no Extent supplied

* Make test custom rule return null extent again by fixing the Engine to be able to cope with it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Engine (Re-)Review Needed Feedback has been addressed during PR stage or is required in the first place.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for suppressing custom rules

2 participants