Skip to content

Commit 67770c7

Browse files
authored
ci: fix swiftformat and upgrade it to 0.54.6 (#198)
1 parent e85f590 commit 67770c7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/analyze.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ jobs:
7070
with:
7171
path: /home/linuxbrew/.linuxbrew
7272
key: ${{ runner.os }}-linuxbrew
73-
- name: Setup homebrew
74-
uses: Homebrew/actions/setup-homebrew@master
75-
- name: Install swiftformat
73+
- name: Install swiftformat 0.54.6
7674
if: steps.cache.outputs.cache-hit != 'true'
7775
run: |
76+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
7877
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
79-
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/86f85aaa82beba49f8a5aabf3a22508c9249f188/Formula/s/swiftformat.rb
78+
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/4564fbc21a326c4eb349327ce327cbe983bf302a/Formula/s/swiftformat.rb
8079
echo 'brew "swiftformat.rb"' > Brewfile
8180
brew bundle
8281
- name: Save Cache
@@ -87,10 +86,12 @@ jobs:
8786
key: ${{ runner.os }}-linuxbrew
8887
- name: Formatter version
8988
run: |
89+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
9090
swiftformat --version
9191
- name: Run format
9292
if: ${{ success() || failure() }}
9393
run: |
94+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
9495
melos run format
9596
- name: Validate formatting
9697
if: ${{ success() || failure() }}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
1010
- **Code Formatting:** [`swiftformat`](https://github.com/nicklockwood/SwiftFormat) (available via brew on macOS, on Windows install Swift toolchain and build SwiftFormat from git sources).
1111

1212
### 1.1. Installing swiftformat
13-
The CI is locked to swiftformat 0.53 version which you can install with the command below:
13+
The CI is locked to swiftformat 0.54.6 version which you can install with the command below:
1414
```bash
15-
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/86f85aaa82beba49f8a5aabf3a22508c9249f188/Formula/s/swiftformat.rb
15+
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/4564fbc21a326c4eb349327ce327cbe983bf302a/Formula/s/swiftformat.rb
1616
brew install swiftformat.rb
1717
```
1818

ios/Classes/Convert.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ enum Convert {
196196
return .left
197197
case .right:
198198
return .right
199-
200199
@unknown default:
201200
return .none
202201
}

0 commit comments

Comments
 (0)