-
Notifications
You must be signed in to change notification settings - Fork 229
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
Fix S3253 FP: Don't raise for primary constructor in type declarations without parameters when they inherit from types with parameters #8436
Comments
Hey there! Just so you know, this rule is not part of the default, SonarWay profile, so updates to it will come a bit slower than SonarWay rules. |
Thanks for the feedback. The repro fits perfect to the issue. |
Please note, that is also affects regular classes as well (not only records) Example:
|
Description
S3253 is reported when a record with a parameterless constructor inherits another record that has parameters and passes them inline (instead of having an explicit base()-call).
Repro steps
Expected behavior
No S3253 is raised because the Foo()-constructor is not redundant.
Actual behavior
S3253 is raised.
Known workarounds
Related information
SonarAnalyzer.CSharp: 9.14.0.81108
The text was updated successfully, but these errors were encountered: