.swiftformat 994 B

123456789101112131415161718192021222324252627282930313233
  1. # Language version.
  2. --swiftversion 5.1
  3. # Ignore generated files.
  4. --exclude **/LinuxMain.swift,**/XCTestManifests.swift,**/*.grpc.swift,**/*.pb.swift
  5. --indent 2
  6. --maxwidth 100
  7. # Require explicit self
  8. --self insert
  9. # Only remove unused args in closures.
  10. --stripunusedargs closure-only
  11. # Wrap before the first argument (if wrapping is necessary).
  12. --wraparguments before-first
  13. # Don't indent #if blocks
  14. --ifdef no-indent
  15. # This rule doesn't always work as we'd expect: specifically when we return a
  16. # succeeded future whose type is a closure then that closure is incorrectly
  17. # treated as a trailing closure. This is relevant because the service provider
  18. # API for client streaming RPCs has this exact shape.
  19. --disable trailingClosures
  20. # Don't wrap the opening brace of multiline statements.
  21. --disable wrapMultilineStatementBraces
  22. # We used to support 5.0 and return is redundant in more places in 5.1: enabling
  23. # this rule creates a large (and unnecessary) diff.
  24. --disable redundantReturn