Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate and package ruleset files for each analyzer package #1718

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

mavasani
Copy link
Contributor

We now generate the following set of ruleset files for each analyzer package during CI build:

  1. AllRulesEnabled.ruleset
  2. AllRulesDefault.ruleset
  3. AllRulesDisabled.ruleset

For every unique rule category within the pacakge, say security, performance, design, etc., we generate 2 ruleset files per category. For example, for Security, we generate:

  1. SecurityRulesEnabled.ruleset (all security rules enabled, including the ones with IsEnabledByDefault = false. All rules from other categories are disabled)
  2. SecurityRulesDefault.ruleset (all security rules have default severity and IsEnabledByDefault is honored. All rules from other categories are disabled)

For the core FxCopAnalyzers package, we also package all the legacy FxCop rulesets, which have been edited to include AllRulesDisabled.ruleset upfront to match legacy FxCop configuration.

Fixes #943

We now generate the following set of ruleset files for each analyzer package:
1. AllRulesEnabled.ruleset
2. AllRulesDefault.ruleset
3. AllRulesDisabled.ruleset

For every unique rule category within the pacakge, say security, performance, design, etc., we generate 2 ruleset files per category. For example, for Security, we generate:
1. SecurityRulesEnabled.ruleset (all security rules enabled, including the ones with IsEnabledByDefault = false. All rules from other categories are disabled)
2. SecurityRulesDefault.ruleset (all security rules have default severity and IsEnabledByDefault is honored. All rules from other categories are disabled)

For the core FxCopAnalyzers package, we also package all the legacy FxCop rulesets, which have been edited to include AllRulesDisabled.ruleset upfront to match legacy FxCop configuration.

Fixes dotnet#943
@mavasani
Copy link
Contributor Author

/cc @jinujoseph @kuhlenh This has been an extremely common ask from legacy FxCop customers, who want to migrate to FxCop analyzers but want to retain the existing rule configurations.

@mavasani
Copy link
Contributor Author

Hopefully, the following screenshots clarify the new packaging structure for our analyzer packages:

image

All rules and per-category rulesets

image

For example, AllRulesDisabled.ruleset
image

Legacy rulesets for FxCop analyzers package:

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants