فهرست منبع

Emit 'swift-format-ignore-file' in generated files to avoid having them reformatted by swift-format (#1606)

Sergey Mikhanov 2 سال پیش
والد
کامیت
fcef85f9b8

+ 1 - 0
Examples/Google/NaturalLanguage/Sources/language_service.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: google/cloud/language/v1/language_service.proto

+ 1 - 0
Sources/Examples/Echo/Model/echo.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: echo.proto

+ 1 - 0
Sources/Examples/HelloWorld/Model/helloworld.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: helloworld.proto

+ 1 - 0
Sources/Examples/RouteGuide/Model/route_guide.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: route_guide.proto

+ 1 - 0
Sources/GRPCInteroperabilityTestModels/Generated/test.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: src/proto/grpc/testing/test.proto

+ 1 - 0
Sources/protoc-gen-grpc-swift/Generator.swift

@@ -111,6 +111,7 @@ class Generator {
     self.printer.print("""
     //
     // DO NOT EDIT.
+    // swift-format-ignore-file
     //
     // Generated by the protocol buffer compiler.
     // Source: \(self.file.name)

+ 1 - 0
Tests/GRPCTests/Codegen/Normalization/normalization.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: normalization.proto

+ 1 - 0
dev/codegen-tests/01-echo/golden/echo.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: echo.proto

+ 1 - 0
dev/codegen-tests/02-multifile/golden/a.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: a.proto

+ 1 - 0
dev/codegen-tests/02-multifile/golden/b.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: b.proto

+ 1 - 0
dev/codegen-tests/03-multifile-with-module-map/golden/a.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: a.proto

+ 1 - 0
dev/codegen-tests/03-multifile-with-module-map/golden/b.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: b.proto

+ 1 - 0
dev/codegen-tests/04-service-with-message-import/golden/service.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: service.proto

+ 1 - 0
dev/codegen-tests/05-service-only/golden/test.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: test.proto

+ 1 - 0
dev/codegen-tests/06-test-client-only/golden/test.grpc.swift

@@ -1,5 +1,6 @@
 //
 // DO NOT EDIT.
+// swift-format-ignore-file
 //
 // Generated by the protocol buffer compiler.
 // Source: test.proto

+ 1 - 1
scripts/license-check.sh

@@ -97,7 +97,7 @@ check_copyright_headers() {
       # Package.swift is preceeded by a "swift-tools-version" line.
       *.grpc.swift)
         expected_sha="$SWIFT_GRPC_SHA"
-        drop_first=8
+        drop_first=9
         expected_lines=13
         ;;
       *.pb.swift)