Swift Format 0.48.17
This commit is contained in:
2
.github/workflows/sanity.yml
vendored
2
.github/workflows/sanity.yml
vendored
@@ -16,6 +16,6 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install mint
|
brew install mint
|
||||||
mint install NickLockwood/SwiftFormat@0.47.13 --no-link
|
mint install NickLockwood/SwiftFormat@0.48.17 --no-link
|
||||||
- name: run script
|
- name: run script
|
||||||
run: ./scripts/sanity.sh
|
run: ./scripts/sanity.sh
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ The main development branch of the repository is `main`.
|
|||||||
|
|
||||||
### Formatting
|
### 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.
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ extension HBParser {
|
|||||||
// count new lines up to this current position
|
// count new lines up to this current position
|
||||||
let buffer = parser.buffer
|
let buffer = parser.buffer
|
||||||
let textBefore = buffer[buffer.startIndex..<self.position]
|
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)
|
return Context(line: String(line), lineNumber: lineNumber + 1, columnNumber: columnNumber + 1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
##
|
##
|
||||||
##===----------------------------------------------------------------------===##
|
##===----------------------------------------------------------------------===##
|
||||||
|
|
||||||
SWIFT_FORMAT_VERSION=0.47.13
|
SWIFT_FORMAT_VERSION=0.48.17
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|||||||
Reference in New Issue
Block a user