Skip to content

Comments

fix: remove BDN1100 rule as GenericTypeArguments now supports abstract classes #3015

Open
Wafaamohamed2 wants to merge 2 commits intodotnet:masterfrom
Wafaamohamed2:fix/delete-rule-BDN1100
Open

fix: remove BDN1100 rule as GenericTypeArguments now supports abstract classes #3015
Wafaamohamed2 wants to merge 2 commits intodotnet:masterfrom
Wafaamohamed2:fix/delete-rule-BDN1100

Conversation

@Wafaamohamed2
Copy link

Overview:

           This PR removes the BDN1100 analyzer rule and its associated tests.

Changes:

           - Removed BDN1100 constant from DiagnosticIds.cs.
           - Removed the logic and diagnostic descriptor from BenchmarkClassAnalyzer.cs.
           - Cleaned up the corresponding localized strings in BenchmarkDotNetAnalyzerResources.resx.
           - Removed the outdated unit tests in BenchmarkClassAnalyzerTests.cs.

Context:

           As discussed in #3008, the constraint preventing [GenericTypeArguments] from being used on abstract classes is no longer necessary and has been removed to provide more flexibility for developers.

@Wafaamohamed2
Copy link
Author

@dotnet-policy-service agree

@timcassell
Copy link
Collaborator

Please update AnalyzerReleases.Unshipped.md with the removed rule.

@filzrev
Copy link
Contributor

filzrev commented Feb 19, 2026

BenchmarkDotNetAnalyzerResources.Designer.cs file also need be updated
(It's automatically updated when save resx file on VS Designer)

Alternatively, it can be resolved with following approach,

  1. Add .gitignore settings for *.Designer.cs
  2. Remove existing *.Designer.cs file from git repository.

@Wafaamohamed2
Copy link
Author

Hi @timcassell and @filzrev, thanks for the feedback.
I've updated the AnalyzerReleases.Unshipped.md with the removed rule and cleaned up the BenchmarkDotNetAnalyzerResources.Designer.cs file.

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.

BDN1100 error is raised by analyzer when using GenericTypeArguments on abstract class

3 participants