Browse Source

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

Sergey Mikhanov 2 years ago
parent
commit
3257ef985b
2 changed files with 2 additions and 1 deletions
  1. 1 0
      Sources/protoc-gen-grpc-swift/Generator.swift
  2. 1 1
      scripts/license-check.sh

+ 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 - 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)