-
Notifications
You must be signed in to change notification settings - Fork 231
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
S3903: Add support for record structs #5574
S3903: Add support for record structs #5574
Conversation
analyzers/src/SonarAnalyzer.Common/Rules/DeclareTypesInNamespacesBase.cs
Outdated
Show resolved
Hide resolved
@@ -43,8 +42,7 @@ public abstract class DeclareTypesInNamespacesBase<TSyntaxKind> : SonarDiagnosti | |||
c => | |||
{ | |||
var declaration = c.Node; | |||
|
|||
if (c.ContainingSymbol.Kind != SymbolKind.NamedType | |||
if (c.IsRedundantPositionalRecordContext() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: There are just 2 conditions that are simple and have explicit name. It can be on a single ine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
This is a small PR as part of the
record struct
saga. It contains a move of theSyntaxNodeAnalysisContextExtensions.cs
file which may introduce conflicts with the otherrecord struct
PRs.