Skip to content

Commit

Permalink
Emit 'swift-format-ignore-file' in generated files to avoid having th…
Browse files Browse the repository at this point in the history
…em reformatted by swift-format (grpc#1606)
  • Loading branch information
smikhanov authored and pinlin168 committed Aug 24, 2023
1 parent 9721aa0 commit 6aeda21
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions Sources/Examples/Echo/Model/echo.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: echo.proto
Expand Down
1 change: 1 addition & 0 deletions Sources/Examples/HelloWorld/Model/helloworld.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: helloworld.proto
Expand Down
1 change: 1 addition & 0 deletions Sources/Examples/RouteGuide/Model/route_guide.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: route_guide.proto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: src/proto/grpc/testing/test.proto
Expand Down
1 change: 1 addition & 0 deletions Sources/protoc-gen-grpc-swift/Generator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: normalization.proto
Expand Down
1 change: 1 addition & 0 deletions dev/codegen-tests/01-echo/golden/echo.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: echo.proto
Expand Down
1 change: 1 addition & 0 deletions dev/codegen-tests/02-multifile/golden/a.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: a.proto
Expand Down
1 change: 1 addition & 0 deletions dev/codegen-tests/02-multifile/golden/b.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: b.proto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: a.proto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: b.proto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: service.proto
Expand Down
1 change: 1 addition & 0 deletions dev/codegen-tests/05-service-only/golden/test.grpc.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: test.proto
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//
// DO NOT EDIT.
// swift-format-ignore-file
//
// Generated by the protocol buffer compiler.
// Source: test.proto
Expand Down
2 changes: 1 addition & 1 deletion scripts/license-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6aeda21

Please sign in to comment.