Browse Source

Disable new swiftformat rule (#936)

Motivation:

- SwiftFormat added a new rule but was pinned to an older version; this
  makes it harder for contributors to resolve issues.

Modifications:

- Disable the new rule
- Build the most recent formatter version; emit the version when running
  the script
- Run the lint check verbosely

Result:

- Less pain when new rules are added
George Barnett 5 years ago
parent
commit
7a5ad0b035
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/sanity.sh

+ 1 - 1
scripts/sanity.sh

@@ -43,7 +43,7 @@ function check_license_headers() {
 
 
 function check_formatting() {
 function check_formatting() {
   hash swiftformat 2> /dev/null || { printf "\033[0;31mERROR\033[0m swiftformat must be installed (see: https://github.com/nicklockwood/SwiftFormat)\n"; exit 1; }
   hash swiftformat 2> /dev/null || { printf "\033[0;31mERROR\033[0m swiftformat must be installed (see: https://github.com/nicklockwood/SwiftFormat)\n"; exit 1; }
-  run_logged "Checking formatting" "swiftformat --lint $HERE/.."
+  run_logged "Checking formatting (swiftformat $(swiftformat --version))" "swiftformat --lint --verbose $HERE/.."
 }
 }
 
 
 errors=0
 errors=0