[ObjC] Fix up clang-format directives in generate files.

- If the source name is long enough, clang-format can want to reflow that
  comment line, so move up the directive.
- Fix typo at the end of the file.
pull/10728/head
Thomas Van Lenten 2 years ago
parent 178a1f6182
commit 672adeb84f
  1. 3
      objectivec/GPBAny.pbobjc.h
  2. 5
      objectivec/GPBAny.pbobjc.m
  3. 3
      objectivec/GPBApi.pbobjc.h
  4. 5
      objectivec/GPBApi.pbobjc.m
  5. 3
      objectivec/GPBDuration.pbobjc.h
  6. 5
      objectivec/GPBDuration.pbobjc.m
  7. 3
      objectivec/GPBEmpty.pbobjc.h
  8. 5
      objectivec/GPBEmpty.pbobjc.m
  9. 3
      objectivec/GPBFieldMask.pbobjc.h
  10. 5
      objectivec/GPBFieldMask.pbobjc.m
  11. 3
      objectivec/GPBSourceContext.pbobjc.h
  12. 5
      objectivec/GPBSourceContext.pbobjc.m
  13. 3
      objectivec/GPBStruct.pbobjc.h
  14. 5
      objectivec/GPBStruct.pbobjc.m
  15. 3
      objectivec/GPBTimestamp.pbobjc.h
  16. 5
      objectivec/GPBTimestamp.pbobjc.m
  17. 3
      objectivec/GPBType.pbobjc.h
  18. 5
      objectivec/GPBType.pbobjc.m
  19. 3
      objectivec/GPBWrappers.pbobjc.h
  20. 5
      objectivec/GPBWrappers.pbobjc.m
  21. 5
      src/google/protobuf/compiler/objectivec/file.cc

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any.proto
// clang-format off
// source: google/protobuf/any.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/any.proto
// clang-format off
// source: google/protobuf/any.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBAny.pbobjc.h"
@ -101,4 +100,4 @@ typedef struct GPBAny__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/api.proto
// clang-format off
// source: google/protobuf/api.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/api.proto
// clang-format off
// source: google/protobuf/api.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBApi.pbobjc.h"
@ -355,4 +354,4 @@ typedef struct GPBMixin__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/duration.proto
// clang-format off
// source: google/protobuf/duration.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/duration.proto
// clang-format off
// source: google/protobuf/duration.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBDuration.pbobjc.h"
@ -96,4 +95,4 @@ typedef struct GPBDuration__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
// clang-format off
// source: google/protobuf/empty.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
// clang-format off
// source: google/protobuf/empty.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBEmpty.pbobjc.h"
@ -72,4 +71,4 @@ typedef struct GPBEmpty__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/field_mask.proto
// clang-format off
// source: google/protobuf/field_mask.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/field_mask.proto
// clang-format off
// source: google/protobuf/field_mask.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBFieldMask.pbobjc.h"
@ -85,4 +84,4 @@ typedef struct GPBFieldMask__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/source_context.proto
// clang-format off
// source: google/protobuf/source_context.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/source_context.proto
// clang-format off
// source: google/protobuf/source_context.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBSourceContext.pbobjc.h"
@ -85,4 +84,4 @@ typedef struct GPBSourceContext__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/struct.proto
// clang-format off
// source: google/protobuf/struct.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/struct.proto
// clang-format off
// source: google/protobuf/struct.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBStruct.pbobjc.h"
@ -298,4 +297,4 @@ typedef struct GPBListValue__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/timestamp.proto
// clang-format off
// source: google/protobuf/timestamp.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/timestamp.proto
// clang-format off
// source: google/protobuf/timestamp.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBTimestamp.pbobjc.h"
@ -96,4 +95,4 @@ typedef struct GPBTimestamp__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto
// clang-format off
// source: google/protobuf/type.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto
// clang-format off
// source: google/protobuf/type.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBType.pbobjc.h"
@ -710,4 +709,4 @@ typedef struct GPBOption__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/wrappers.proto
// clang-format off
// source: google/protobuf/wrappers.proto
#import "GPBDescriptor.h"
#import "GPBMessage.h"

@ -1,7 +1,6 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/wrappers.proto
// clang-format off
// source: google/protobuf/wrappers.proto
#import "GPBProtocolBuffers_RuntimeSupport.h"
#import "GPBWrappers.pbobjc.h"
@ -444,4 +443,4 @@ typedef struct GPBBytesValue__storage_ {
// @@protoc_insertion_point(global_scope)
// clange-format on
// clang-format on

@ -644,7 +644,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"\n"
"// @@protoc_insertion_point(global_scope)\n"
"\n"
"// clange-format on\n");
"// clang-format on\n");
}
// Helper to print the import of the runtime support at the top of generated
@ -655,9 +655,8 @@ void FileGenerator::PrintFileRuntimePreamble(
const std::vector<std::string>& headers_to_import) const {
printer->Print(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// source: $filename$\n"
"\n"
"// clang-format off\n"
"// source: $filename$\n"
"\n",
"filename", file_->name());

Loading…
Cancel
Save