Swift Format 0.48.17

This commit is contained in:
Adam Fowler
2021-10-30 11:23:58 +01:00
parent 8b38438f17
commit 94bbca47ae
4 changed files with 4 additions and 4 deletions

View File

@@ -16,6 +16,6 @@ jobs:
- name: Install Dependencies
run: |
brew install mint
mint install NickLockwood/SwiftFormat@0.47.13 --no-link
mint install NickLockwood/SwiftFormat@0.48.17 --no-link
- name: run script
run: ./scripts/sanity.sh

View File

@@ -30,4 +30,4 @@ The main development branch of the repository is `main`.
### Formatting
We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.47.13.
We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.48.17.

View File

@@ -314,7 +314,7 @@ extension HBParser {
// count new lines up to this current position
let buffer = parser.buffer
let textBefore = buffer[buffer.startIndex..<self.position]
let lineNumber = textBefore.filter { $0.isNewline }.count
let lineNumber = textBefore.filter(\.isNewline).count
return Context(line: String(line), lineNumber: lineNumber + 1, columnNumber: columnNumber + 1)
}

View File

@@ -13,7 +13,7 @@
##
##===----------------------------------------------------------------------===##
SWIFT_FORMAT_VERSION=0.47.13
SWIFT_FORMAT_VERSION=0.48.17
set -eu
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"