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

[csharp] Fix csharp doc comments #36000

Closed
wants to merge 2 commits into from

Conversation

tonydnewell
Copy link
Contributor

Fix C# document comments when there is an extra / at the start of a comment line.
See #35905

Related to protocolbuffers/protobuf#15955 which also fixes the issue in protoc compiler.

@tonydnewell
Copy link
Contributor Author

@apolcyn @jskeet for review

copybara-service bot pushed a commit to protocolbuffers/protobuf that referenced this pull request Feb 26, 2024
Fix C# document comments when there is an extra `/` at the start of a comment line.
See grpc/grpc#35905

Related to grpc/grpc#36000 which also fixes the issue in the gRPC C# plugin

Closes #15955

COPYBARA_INTEGRATE_REVIEW=#15955 from tonydnewell:csharp-comment-fix d80e09a
FUTURE_COPYBARA_INTEGRATE_REVIEW=#15955 from tonydnewell:csharp-comment-fix d80e09a
PiperOrigin-RevId: 610423152
copybara-service bot pushed a commit to protocolbuffers/protobuf that referenced this pull request Feb 27, 2024
Fix C# document comments when there is an extra `/` at the start of a comment line.
See grpc/grpc#35905

Related to grpc/grpc#36000 which also fixes the issue in the gRPC C# plugin

Closes #15955

COPYBARA_INTEGRATE_REVIEW=#15955 from tonydnewell:csharp-comment-fix d80e09a
FUTURE_COPYBARA_INTEGRATE_REVIEW=#15955 from tonydnewell:csharp-comment-fix d80e09a
PiperOrigin-RevId: 610423152
copybara-service bot pushed a commit to protocolbuffers/protobuf that referenced this pull request Feb 27, 2024
Fix C# document comments when there is an extra `/` at the start of a comment line.
See grpc/grpc#35905

Related to grpc/grpc#36000 which also fixes the issue in the gRPC C# plugin

Closes #15955

COPYBARA_INTEGRATE_REVIEW=#15955 from tonydnewell:csharp-comment-fix d80e09a
PiperOrigin-RevId: 610784971
@apolcyn
Copy link
Contributor

apolcyn commented Feb 28, 2024

@tonydnewell clang format complains:

printer->Print("///\n");
       }
       last_was_empty = false;
-      // If the comment has an extra slash at the start then this can cause the C# compiler
-      // to complain when generating the XML documentation
-      // Issue [https://github.com/grpc/grpc/issues/35905](https://www.google.com/url?q=https://github.com/grpc/grpc/issues/35905&sa=D)
+      // If the comment has an extra slash at the start then this can cause the
+      // C# compiler to complain when generating the XML documentation Issue
+      // [https://github.com/grpc/grpc/issues/35905](https://www.google.com/url?q=https://github.com/grpc/grpc/issues/35905&sa=D)
       if (line[0] == '/') {
-        line.replace(0,1,"/");
+        line.replace(0, 1, "/");
       }
       printer->Print("///$line$\n", "line", line);
     }

@apolcyn apolcyn changed the title Fix csharp doc comments [csharp] Fix csharp doc comments Mar 6, 2024
@apolcyn apolcyn added release notes: yes Indicates if PR needs to be in release notes kokoro:force-run labels Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants