-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add GeneratedCodeAttribute to Generated code #621
Conversation
@AArnott If you could give this a quick review that would be great. |
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.
Thanks for contributing. I think you're almost there.
@AArnott, the remaining test failures are a bit of a strange one. They are all off by one tab space. If you call |
Thank you for getting us this far. I hope to look more into this today or tomorrow. |
@sharwell this code causes the xml comment to have an extra leading tab white space: typeDeclaration = typeDeclaration
.WithLeadingTrivia()
.AddAttributeLists(AttributeList().AddAttributes(GeneratedCodeAttribute))
.WithLeadingTrivia(typeDeclaration.GetLeadingTrivia()); The generated code attribute is: private static readonly AttributeSyntax GeneratedCodeAttribute = Attribute(IdentifierName("global::System.CodeDom.Compiler.GeneratedCode"))
.WithArgumentList(FixTrivia(AttributeArgumentList().AddArguments(
AttributeArgument(LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(ThisAssembly.AssemblyName))),
AttributeArgument(LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(ThisAssembly.AssemblyInformationalVersion)))))); It seems like an issue in Roslyn, but its more likely PEBKAC. Is there anything obvious I have missed? |
@AArnott Youssef1313 pointed out in the roslyn issue that the problem is in Edit: It looks like there is an issue in |
aa5fe0a
to
d60d410
Compare
@elachlan Can you see if elachlan#1 fixes the issue? |
I'll pull yours down now and check it. |
@Youssef1313 I have pushed through some more changes around for loop indenting. This is what its generating at the moment inside Edit: it might actually just be single line. |
I gave up on the for loops. I have fixed the other test issues. We can fix the rest of the white space issues in another PR. |
@AArnott can you give this another review? |
@Youssef1313 thank you for your help on this! It helped immensely. |
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.
Thank you for your contribution. I would never have guessed this required so much work. I appreciate your dedication.
Closes #594