Skip to content

Commit

Permalink
Merge pull request #35 from RakuyoKit/feature/swiftformat
Browse files Browse the repository at this point in the history
Feature/swiftformat
  • Loading branch information
rakuyoMo authored Jul 15, 2024
2 parents 8c9b0a6 + 7a61c1f commit 81ba39d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ let package = Package(

.binaryTarget(
name: "SwiftFormat",
url: "https://github.com/nicklockwood/SwiftFormat/releases/download/0.54.0/SwiftFormat.artifactbundle.zip",
checksum: "edf4ed2f1664ad621ae71031ff915e0c6ef80ad66e87ea0e5a10c3580a27a6dd"
url: "https://github.com/nicklockwood/SwiftFormat/releases/download/0.54.1/SwiftFormat.artifactbundle.zip",
checksum: "ceabca9e43b3d94f8005a48744e6a1ca4006daa43ff8349808469a584ed88ef5"
),

.binaryTarget(
Expand Down
2 changes: 2 additions & 0 deletions Sources/RakuyoSwiftFormatTool/rakuyo.swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
--shortoptionals always # typeSugar
--semicolons never # semicolons
--doccomments preserve # docComments
--nilInit insert # redundantNilInit

# We recommend a max width of 100 but _strictly enforce_ a max width of 130
--maxwidth 130 # wrap
Expand Down Expand Up @@ -108,3 +109,4 @@
--rules redundantTypedThrows
--rules consistentSwitchCaseSpacing
--rules blankLineAfterSwitchCase
--rules redundantNilInit
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ extension RakuyoSwiftFormatToolTest {

/// Mock implementations of the commands ran by `RakuyoSwiftFormatTool`
struct MockCommands {
var swiftFormat: (() -> Int32)?
var swiftLint: (() -> Int32)?
var swiftLintAutocorrect: (() -> Int32)?
var swiftFormat: (() -> Int32)? = nil
var swiftLint: (() -> Int32)? = nil
var swiftLintAutocorrect: (() -> Int32)? = nil

func mockRunCommand(_ command: Command) -> Int32 {
if command.launchPath.lowercased().contains("swiftformat") {
Expand Down

0 comments on commit 81ba39d

Please sign in to comment.