Skip to content

Commit 7b0f09a

Browse files
smikhanovWendellXY
authored andcommitted
Emit 'swift-format-ignore-file' in generated files to avoid having them reformatted by swift-format (grpc#1606)
1 parent a4ce5fd commit 7b0f09a

File tree

16 files changed

+16
-1
lines changed

16 files changed

+16
-1
lines changed

Diff for: Examples/Google/NaturalLanguage/Sources/language_service.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: google/cloud/language/v1/language_service.proto

Diff for: Sources/Examples/Echo/Model/echo.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: echo.proto

Diff for: Sources/Examples/HelloWorld/Model/helloworld.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: helloworld.proto

Diff for: Sources/Examples/RouteGuide/Model/route_guide.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: route_guide.proto

Diff for: Sources/GRPCInteroperabilityTestModels/Generated/test.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: src/proto/grpc/testing/test.proto

Diff for: Sources/protoc-gen-grpc-swift/Generator.swift

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ class Generator {
111111
self.printer.print("""
112112
//
113113
// DO NOT EDIT.
114+
// swift-format-ignore-file
114115
//
115116
// Generated by the protocol buffer compiler.
116117
// Source: \(self.file.name)

Diff for: Tests/GRPCTests/Codegen/Normalization/normalization.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: normalization.proto

Diff for: dev/codegen-tests/01-echo/golden/echo.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: echo.proto

Diff for: dev/codegen-tests/02-multifile/golden/a.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: a.proto

Diff for: dev/codegen-tests/02-multifile/golden/b.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: b.proto

Diff for: dev/codegen-tests/03-multifile-with-module-map/golden/a.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: a.proto

Diff for: dev/codegen-tests/03-multifile-with-module-map/golden/b.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: b.proto

Diff for: dev/codegen-tests/04-service-with-message-import/golden/service.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: service.proto

Diff for: dev/codegen-tests/05-service-only/golden/test.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: test.proto

Diff for: dev/codegen-tests/06-test-client-only/golden/test.grpc.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//
22
// DO NOT EDIT.
3+
// swift-format-ignore-file
34
//
45
// Generated by the protocol buffer compiler.
56
// Source: test.proto

Diff for: scripts/license-check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ check_copyright_headers() {
9797
# Package.swift is preceeded by a "swift-tools-version" line.
9898
*.grpc.swift)
9999
expected_sha="$SWIFT_GRPC_SHA"
100-
drop_first=8
100+
drop_first=9
101101
expected_lines=13
102102
;;
103103
*.pb.swift)

0 commit comments

Comments
 (0)