Przeglądaj źródła

Add .swiftformat and apply a lint check in CI (#929)

Motivation:

The code style used by gRPC Swift is quite different from what most
contributors are used to, indenting with two spaces instead of Xcode's default
of four, for example. This is often irritating for contributors since
they need to adjust their Xcode settings and reformat their code to
match our style, and also for reviewers since they need to highlight
these differences.

Modifications:

- Add a .swiftformat configuration file and ensure it's validated as
  part of the CI preflight checks
- Apply swiftformat to baseline the formatting

Result:

- CI will check fail before running test if there are formatting
  violations
- Users can run fix their formatting by running 'swiftformat .' in the
  root of the repository
George Barnett 5 lat temu
rodzic
commit
885c6a2257
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      scripts/sanity.sh

+ 1 - 3
scripts/sanity.sh

@@ -46,6 +46,4 @@ function check_formatting() {
 }
 
 check_license_headers
-
-# We won't run this just yet.
-# check_formatting
+check_formatting