feat: Enable project-level exceptions in ReferenceCop ruleset#60
Open
mfogliatto wants to merge 1 commit into
Open
feat: Enable project-level exceptions in ReferenceCop ruleset#60mfogliatto wants to merge 1 commit into
mfogliatto wants to merge 1 commit into
Conversation
Add an Exceptions element to rules that allows specifying projects
that are exempt from a given rule. Each rule can now contain:
<Exceptions>
<Project Name="MyProject" />
</Exceptions>
- Added ProjectException class and Exceptions list to Rule base class
- Added IsProjectExempt() method for checking exemptions
- Updated all three violation detectors to check exceptions
- Updated XSD schema with Exceptions element for all rule types
- Added unit tests for the new functionality
Fixes #29
Owner
Author
|
Pending on CI/CD change first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for configuring project-level exceptions on rules in the ReferenceCop config file. Projects listed in a rule's
<Exceptions>element are exempt from that rule.Changes
ProjectExceptionclass andExceptionslist toRulebase class, withIsProjectExempt()methodprojectNameparameter; checks exceptions before reporting violationscompilation.AssemblyNameto the detectorExceptionselement for all rule typesUsage
Fixes #29