Skip to content

Commit

Permalink
Add SwiftFormat linting to github actions (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamede1945 authored Feb 10, 2024
1 parent c83a53a commit c447d28
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ jobs:

- name: Build
run: set -o pipefail && xcrun xcodebuild build -project Example/QuranEngineApp.xcodeproj -scheme QuranEngineApp -sdk "iphonesimulator" -destination 'generic/platform=iOS' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty

SwiftFormat:
runs-on: macos-13

steps:
- uses: actions/checkout@v2

- name: Setting up Xcode
run: sudo xcode-select -s "/Applications/Xcode_15.1.app"

- name: SwiftFormat
run: swift run -c release --package-path ./BuildTools swiftformat --lint .
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DerivedData
# Swift Package Manager. See: https://github.com/apple/swift-package-manager/blob/main/Sources/Workspace/InitPackage.swift#L381

.DS_Store
/.build
.build
/Packages
xcuserdata/
DerivedData/
Expand Down
Empty file added BuildTools/Empty.swift
Empty file.
14 changes: 14 additions & 0 deletions BuildTools/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "swiftformat",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nicklockwood/SwiftFormat",
"state" : {
"revision" : "402367fbe91d6a453bc608bfc0d93b14a301a519",
"version" : "0.53.1"
}
}
],
"version" : 2
}
11 changes: 11 additions & 0 deletions BuildTools/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// swift-tools-version:5.8
import PackageDescription

let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_13)],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.49.0"),
],
targets: [.target(name: "BuildTools", path: "")]
)

0 comments on commit c447d28

Please sign in to comment.