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

Fix issue in attribute line with attribute class name #8897

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

praveenkuttappan
Copy link
Member

Fixes following issue in attribute line

Attribute line is shown as [AttributeUsage(AttributeTargets . Class ) ] instead of [AttributeUsage(AttributeTargets.Class )]

@praveenkuttappan praveenkuttappan added APIView Central-EngSys This issue is owned by the Engineering System team. labels Aug 27, 2024
@praveenkuttappan praveenkuttappan self-assigned this Aug 27, 2024
@@ -517,8 +517,10 @@ private void BuildAttributes(List<ReviewLine> reviewLines, ImmutableArray<Attrib
attributeLine.AddToken(ReviewToken.CreatePunctuationToken(SyntaxKind.EqualsToken));
BuildTypedConstant(attributeLine, argument.Value);
}
attributeLine.Tokens.Last().HasSuffixSpace = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christothes are there any other cases where there needs to be special considerations for attributes?

@praveenkuttappan
Copy link
Member Author

Review block for attribute with class looks like below with this fix.

[AttributeUsage(AttributeTargets.Class)] 
public sealed class PersistableModelProxyAttribute : Attribute { 
  public PersistableModelProxyAttribute(Type proxyType); 
  [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] 
  public Type ProxyType { get; }
}

@praveenkuttappan praveenkuttappan enabled auto-merge (squash) August 28, 2024 16:26
@praveenkuttappan praveenkuttappan merged commit 5835f21 into Azure:main Aug 28, 2024
14 checks passed
@praveenkuttappan praveenkuttappan deleted the misc_fixes branch August 28, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIView Central-EngSys This issue is owned by the Engineering System team.
Projects
Status: ✅ Done
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants