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

NFC: enforce style for C# locally and on CI #1567

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Conversation

RReverser
Copy link
Contributor

Description of Changes

As suggested in the other PR, adds C# style checks to the CI so that minor issues and reformatting are fixed early.

API and ABI breaking changes

If this is an API or ABI breaking change, please apply the
corresponding GitHub label.

Expected complexity level and risk

1

How complicated do you think these changes are? Grade on a scale from 1 to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex change.

This complexity rating applies not only to the complexity apparent in the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning ways.

Testing

Describe any testing you've done, and any testing you'd like your reviewers to do,
so that you're confident that all the changes work as expected!

  • Write a test you've completed here.
  • Write a test you want a reviewer to do here, so they can check it off when they're satisfied.

@bfops bfops added no runtime change This change does not affect the final binaries release-any To be landed in any release window labels Aug 12, 2024
Copy link
Contributor

@kazimuth kazimuth left a comment

Choose a reason for hiding this comment

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

This all looks reasonable, I assume all the code changes were because the style checker
was complaining?

@@ -176,7 +176,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
transform: (context, ct) =>
{
var tableSyntax = (TypeDeclarationSyntax)context.TargetNode;
var table = context.SemanticModel.GetDeclaredSymbol(tableSyntax)!;
var table = context.SemanticModel.GetDeclaredSymbol(tableSyntax, ct)!;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks like an actual runtime change, yes? Why is that?

Copy link
Collaborator

Choose a reason for hiding this comment

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

(I removed the no-runtime-change label)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well as it's purely codegen, technically it's still compile-time change, and one that shouldn't matter at that... but I don't have a strong opinion on that.

@bfops bfops removed the no runtime change This change does not affect the final binaries label Aug 13, 2024
@RReverser RReverser force-pushed the ingvar/csharp-format-ci branch from b4e03c5 to d660a04 Compare August 13, 2024 20:07
@RReverser RReverser enabled auto-merge August 13, 2024 20:07
@RReverser RReverser force-pushed the ingvar/csharp-format-ci branch from d660a04 to 66fe192 Compare August 21, 2024 16:09
@RReverser RReverser added this pull request to the merge queue Aug 21, 2024
Merged via the queue into master with commit 9f1b6dc Aug 21, 2024
7 checks passed
@RReverser RReverser deleted the ingvar/csharp-format-ci branch August 22, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-any To be landed in any release window
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants