Skip to content

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

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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