Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix swiftformat and upgrade it to 0.54.6 #198

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/analyze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ jobs:
with:
path: /home/linuxbrew/.linuxbrew
key: ${{ runner.os }}-linuxbrew
- name: Setup homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install swiftformat
- name: Install swiftformat 0.54.6
if: steps.cache.outputs.cache-hit != 'true'
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/86f85aaa82beba49f8a5aabf3a22508c9249f188/Formula/s/swiftformat.rb
curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/4564fbc21a326c4eb349327ce327cbe983bf302a/Formula/s/swiftformat.rb
echo 'brew "swiftformat.rb"' > Brewfile
brew bundle
- name: Save Cache
Expand All @@ -87,10 +86,12 @@ jobs:
key: ${{ runner.os }}-linuxbrew
- name: Formatter version
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
swiftformat --version
- name: Run format
if: ${{ success() || failure() }}
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
melos run format
- name: Validate formatting
if: ${{ success() || failure() }}
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ _See also: [Flutter's code of conduct](https://flutter.io/design-principles/#cod
- **Code Formatting:** [`swiftformat`](https://github.com/nicklockwood/SwiftFormat) (available via brew on macOS, on Windows install Swift toolchain and build SwiftFormat from git sources).

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

Expand Down
1 change: 0 additions & 1 deletion ios/Classes/Convert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ enum Convert {
return .left
case .right:
return .right

@unknown default:
return .none
}
Expand Down
Loading