Skip to content

Commit e9530e0

Browse files
authored
Merge pull request #1236 from rgoldberg/7.0.0/1235-cleanup
2 parents 3a5482a + 3413fa3 commit e9530e0

46 files changed

Lines changed: 430 additions & 349 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# .swiftformat
33
# mas
44
#
5-
# SwiftFormat 0.61.0
5+
# SwiftFormat 0.61.1
66
#
77

88
# Disabled rules (enabled by default)

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,9 @@ Within this section & all subsections, `X` is a placeholder for any type name.
298298
6. `switch`
299299
7. Multiple `guard`
300300
8. `if` / `else if`… / `else`
301-
9. Forced unwrapping (`!` suffix)
302-
10. `fatalError(_:file:line:)`
301+
9. `preconditionFailure(_:file:line:)`
302+
10. Forced unwrapping (`!` suffix)
303+
11. `fatalError(_:file:line:)`
303304

304305
#### Throwing
305306

Brewfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
brew "actionlint" # 1.7.12
22
brew "editorconfig-checker" # 3.6.1
3-
brew "gh" # 2.91.0
3+
brew "gh" # 2.92.0
44
brew "git" # 2.54.0
55
brew "ipsw" # 3.1.672
66
brew "markdownlint-cli2" # 0.22.1
77
brew "periphery" if MacOS.version >= :sequoia && `/usr/bin/arch` == "arm64" # 3.7.4
88
brew "shellcheck" # 0.11.0
9-
brew "swiftformat" # 0.61.0
9+
brew "swiftformat" # 0.61.1
1010
brew "swiftlint" # 0.63.2
1111
brew "yamllint" # 1.38.0

Scripts/mas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ try (
5757
lookup|info)
5858
{
5959
{ exec "${mas}" "${@}" 3>&1 1>&4 2>&5 } | "${jq}" -sr '
60-
def numberCommas($n):
60+
def number_commas($n):
6161
($n | abs | round | tostring) as $s |
6262
if $n < 0 then "-" else "" end + ([$s | while(length > 0; .[:-3]) | .[-3:]] | reverse | join(","))
6363
;
@@ -81,7 +81,7 @@ try (
8181
"\($key_map[$k]) \("▁" * ($max_key_length - ($key_map[$k] | length) + 1)) \(
8282
$in[$k] |
8383
if $k == "fileSizeBytes" then
84-
numberCommas(tonumber? / 1e6 // 0) + " MB"
84+
number_commas(tonumber? / 1e6 // 0) + " MB"
8585
elif $k == "currentVersionReleaseDate" then
8686
(fromdateiso8601? | strflocaltime("%Y-%m-%d")) // .
8787
else

Sources/mas/AppStore/AppStoreAction+download.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver {
287287

288288
MAS.printer.notice(
289289
[action.performed.uppercasingFirst, snapshot.appNameAndVersion]
290-
+ (appFolderURL.map { ["in", $0.filePath] } ?? .init()),
290+
+ (appFolderURL.map { ["in", $0.filePath] } ?? .init()), // swiftformat:disable:this indent
291291
)
292292

293293
if let appFolderURL {
@@ -513,7 +513,7 @@ extension PhaseType: CustomStringConvertible {
513513
case .downloaded:
514514
"Downloaded"
515515
case let .performing(action):
516-
action.performing
516+
action.performing.uppercasingFirst
517517
}
518518
}
519519
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Config.swift
2+
// MAS.Config.swift
33
// mas
44
//
55
// Copyright © 2025 mas-cli. All rights reserved.
@@ -23,8 +23,8 @@ extension MAS {
2323
func run() {
2424
outputFormatOptionGroup.info(
2525
JSON.Object( // swiftformat:disable:this wrap wrapArguments
26-
dictionaryLiteral: // swiftformat:disable indent
27-
("mas", .string(version)), // swiftlint:disable vertical_parameter_alignment_on_call
26+
dictionaryLiteral: // swiftlint:disable vertical_parameter_alignment_on_call
27+
("mas", .string(version)), // swiftformat:disable indent
2828
("slice", .string(runningSliceArchitecture)),
2929
("slices", .string(supportedSliceArchitectures.joined(separator: " "))),
3030
("dist", .string(distribution)),
@@ -102,7 +102,7 @@ private func configStringValue(_ name: String) -> String {
102102
return unknown
103103
}
104104

105-
return unsafe .init(cString: &buffer) // swiftformat:disable:this spaceAroundOperators
105+
return unsafe .init(cString: &buffer)
106106
}
107107

108108
private let unknown = "unknown"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Get.swift
2+
// MAS.Get.swift
33
// mas
44
//
55
// Copyright © 2026 mas-cli. All rights reserved.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Home.swift
2+
// MAS.Home.swift
33
// mas
44
//
55
// Copyright © 2018 mas-cli. All rights reserved.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Install.swift
2+
// MAS.Install.swift
33
// mas
44
//
55
// Copyright © 2015 mas-cli. All rights reserved.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// List.swift
2+
// MAS.List.swift
33
// mas
44
//
55
// Copyright © 2015 mas-cli. All rights reserved.

0 commit comments

Comments
 (0)