Skip to content

Commit 38996a7

Browse files
authored
Prepared package for Swift 6.2 (#16)
1 parent d55ddb9 commit 38996a7

72 files changed

Lines changed: 1334 additions & 501 deletions

File tree

Some content is hidden

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

.github/workflows/pull-request.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15-
XCODE_VERSION: "16.3"
15+
XCODE_VERSION: "26.1"
1616

1717
jobs:
1818
prepare:
19-
runs-on: macos-15
19+
runs-on: macos-26
2020
outputs:
2121
platforms: ${{ steps.platforms.outputs.platforms }}
2222
scheme: ${{ steps.scheme.outputs.scheme }}
@@ -62,7 +62,7 @@ jobs:
6262
6363
build-and-test:
6464
needs: prepare
65-
runs-on: macos-15
65+
runs-on: macos-26
6666
strategy:
6767
fail-fast: false
6868
matrix:
@@ -81,16 +81,16 @@ jobs:
8181
destination="platform=macOS,variant=Mac Catalyst"
8282
;;
8383
ios)
84-
destination="platform=iOS Simulator,name=iPhone 16 Pro Max,OS=latest"
84+
destination="platform=iOS Simulator,name=iPhone 17 Pro Max,OS=26.1"
8585
;;
8686
tvos)
87-
destination="platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest"
87+
destination="platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=26.1"
8888
;;
8989
watchos)
90-
destination="platform=watchOS Simulator,name=Apple Watch Series 10 (46mm),OS=latest"
90+
destination="platform=watchOS Simulator,name=Apple Watch Series 11 (46mm),OS=26.1"
9191
;;
9292
visionos)
93-
destination="platform=visionOS Simulator,name=Apple Vision Pro,OS=latest"
93+
destination="platform=visionOS Simulator,name=Apple Vision Pro,OS=26.1"
9494
;;
9595
*)
9696
echo "Unknown platform: ${{ matrix.platform }}"
@@ -136,4 +136,4 @@ jobs:
136136
if: ${{ matrix.platform == 'macos' }}
137137
uses: codecov/codecov-action@v5
138138
with:
139-
fail_ci_if_error: true
139+
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
- '*'
77

88
env:
9-
XCODE_VERSION: "16.3"
9+
XCODE_VERSION: "26.1"
1010

1111
jobs:
1212
release:
13-
runs-on: macos-15
13+
runs-on: macos-26
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:

.mise.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ swiftlint = '~/.local/bin/mise x -- swiftlint'
55
swiftformat = '~/.local/bin/mise x -- swiftformat'
66

77
[tools]
8-
swiftlint = "0.58.2"
9-
swiftformat = "0.55.5"
8+
swiftlint = "0.62.2"
9+
swiftformat = "0.58.5"
1010

1111
[tasks.lint]
1212
description = 'Run all linters'

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1
1+
6.2

.swiftformat

Lines changed: 114 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,125 @@
11
--acronyms ID,URL,UUID
22
--allman false
3-
--anonymousforeach convert
4-
--assetliterals visual-width
5-
--asynccapturing
6-
--beforemarks
7-
--binarygrouping 4,8
8-
--callsiteparen default
9-
--categorymark "MARK: %c"
10-
--classthreshold 0
11-
--closingparen default
12-
--closurevoid remove
13-
--commas inline
14-
--complexattrs prev-line
15-
--computedvarattrs prev-line
16-
--condassignment always
17-
--conflictmarkers reject
18-
--dateformat system
19-
--decimalgrouping 3,6
20-
--doccomments before-declarations
21-
--elseposition same-line
22-
--emptybraces no-space
23-
--enumnamespaces always
24-
--enumthreshold 0
25-
--exponentcase lowercase
26-
--exponentgrouping disabled
27-
--extensionacl on-declarations
28-
--extensionlength 0
29-
--extensionmark "MARK: - %t + %c"
30-
--fractiongrouping disabled
3+
--allow-partial-wrapping true
4+
--anonymous-for-each convert
5+
--asset-literals visual-width
6+
--async-capturing
7+
--before-marks
8+
--binary-grouping 4,8
9+
--blank-line-after-switch-case multiline-only
10+
--call-site-paren default
11+
--category-mark "MARK: %c"
12+
--class-threshold 0
13+
--closing-paren default
14+
--closure-void remove
15+
--complex-attributes prev-line
16+
--computed-var-attributes prev-line
17+
--conditional-assignment always
18+
--conflict-markers reject
19+
--date-format system
20+
--decimal-grouping 3,6
21+
--default-test-suite-attributes
22+
--doc-comments before-declarations
23+
--else-position same-line
24+
--empty-braces no-space
25+
--enum-namespaces always
26+
--enum-threshold 0
27+
--equatable-macro none
28+
--exponent-case lowercase
29+
--exponent-grouping disabled
30+
--extension-acl on-declarations
31+
--extension-mark "MARK: - %t + %c"
32+
--extension-threshold 0
33+
--file-macro "#file"
34+
--fraction-grouping disabled
3135
--fragment false
32-
--funcattributes prev-line
33-
--generictypes
34-
--groupblanklines true
35-
--groupedextension "MARK: %c"
36-
--guardelse next-line
36+
--func-attributes prev-line
37+
--generic-types
38+
--group-blank-lines true
39+
--grouped-extension "MARK: %c"
40+
--guard-else next-line
3741
--header ignore
38-
--hexgrouping 4,8
39-
--hexliteralcase uppercase
42+
--hex-grouping 4,8
43+
--hex-literal-case uppercase
4044
--ifdef indent
41-
--importgrouping testable-first
45+
--import-grouping testable-first
4246
--indent 4
43-
--indentcase false
44-
--indentstrings false
45-
--inferredtypes always
46-
--initcodernil false
47-
--inlinedforeach ignore
47+
--indent-case false
48+
--indent-strings false
49+
--inferred-types always
50+
--init-coder-nil false
4851
--lifecycle
49-
--lineaftermarks true
52+
--line-after-marks true
53+
--line-between-guards false
5054
--linebreaks lf
51-
--markcategories true
52-
--markextensions always
53-
--marktypes always
54-
--maxwidth none
55-
--modifierorder
56-
--nevertrailing
57-
--nilinit remove
58-
--noncomplexattrs
59-
--nospaceoperators
60-
--nowrapoperators
61-
--octalgrouping 4,8
62-
--operatorfunc spaced
63-
--organizationmode visibility
64-
--organizetypes actor,class,enum,struct
65-
--patternlet hoist
66-
--preservedecls
67-
--preservedsymbols Package
68-
--propertytypes inferred
55+
--mark-categories true
56+
--mark-class-threshold 0
57+
--mark-enum-threshold 0
58+
--mark-extension-threshold 0
59+
--mark-extensions always
60+
--mark-struct-threshold 0
61+
--mark-types always
62+
--markdown-files ignore
63+
--max-width none
64+
--modifier-order
65+
--never-trailing
66+
--nil-init remove
67+
--no-space-operators
68+
--no-wrap-operators
69+
--non-complex-attributes
70+
--octal-grouping 4,8
71+
--operator-func spaced
72+
--organization-mode visibility
73+
--organize-types actor,class,enum,struct
74+
--pattern-let hoist
75+
--preserve-acronyms
76+
--preserve-decls
77+
--preserved-property-types Package
78+
--property-types inferred
6979
--ranges spaced
80+
--redundant-async always
81+
--redundant-throws always
7082
--self init-only
71-
--selfrequired
72-
--semicolons inline
73-
--shortoptionals always
74-
--smarttabs enabled
75-
--someany true
76-
--sortedpatterns
77-
--storedvarattrs prev-line
78-
--stripunusedargs always
79-
--structthreshold 0
80-
--tabwidth unspecified
81-
--throwcapturing
83+
--self-required
84+
--semicolons inline-only
85+
--short-optionals always
86+
--single-line-for-each ignore
87+
--smart-tabs enabled
88+
--some-any true
89+
--sort-swiftui-properties none
90+
--sorted-patterns
91+
--stored-var-attributes prev-line
92+
--strip-unused-args always
93+
--struct-threshold 0
94+
--tab-width unspecified
95+
--throw-capturing
8296
--timezone system
83-
--trailingclosures
84-
--trimwhitespace always
85-
--typeattributes prev-line
86-
--typeblanklines preserve
87-
--typedelimiter space-after
88-
--typemark "MARK: - %t"
89-
--typemarks
90-
--typeorder
91-
--visibilitymarks
92-
--visibilityorder
93-
--voidtype void
94-
--wraparguments before-first
95-
--wrapcollections before-first
96-
--wrapconditions after-first
97-
--wrapeffects preserve
98-
--wrapenumcases always
99-
--wrapparameters before-first
100-
--wrapreturntype preserve
101-
--wrapternary before-operators
102-
--wraptypealiases after-first
103-
--xcodeindentation enabled
104-
--yodaswap always
105-
--disable enumNamespaces,fileHeader,headerFileName,redundantInternal,wrap,wrapMultilineStatementBraces,wrapSingleLineComments
106-
--enable acronyms,blankLinesBetweenImports,blockComments,docComments,isEmpty,propertyTypes,redundantProperty,sortSwitchCases,unusedPrivateDeclarations,wrapConditionalBodies,wrapEnumCases
97+
--trailing-closures
98+
--trailing-commas never
99+
--trim-whitespace always
100+
--type-attributes prev-line
101+
--type-blank-lines preserve
102+
--type-body-marks preserve
103+
--type-delimiter space-after
104+
--type-mark "MARK: - %t"
105+
--type-marks
106+
--type-order
107+
--url-macro none
108+
--visibility-marks
109+
--visibility-order
110+
--void-type Void
111+
--wrap-arguments before-first
112+
--wrap-collections before-first
113+
--wrap-conditions after-first
114+
--wrap-effects preserve
115+
--wrap-enum-cases always
116+
--wrap-parameters before-first
117+
--wrap-return-type preserve
118+
--wrap-string-interpolation default
119+
--wrap-ternary before-operators
120+
--wrap-type-aliases after-first
121+
--xcode-indentation enabled
122+
--xctest-symbols
123+
--yoda-swap always
124+
--disable fileHeader,headerFileName,redundantInternal,wrap,wrapMultilineStatementBraces,wrapSingleLineComments
125+
--enable acronyms,blankLinesBetweenImports,blockComments,docComments,emptyExtensions,environmentEntry,isEmpty,noForceTryInTests,noForceUnwrapInTests,noGuardInTests,propertyTypes,redundantAsync,redundantMemberwiseInit,redundantProperty,redundantThrows,singlePropertyPerLine,sortSwitchCases,unusedPrivateDeclarations,wrapConditionalBodies,wrapEnumCases,wrapMultilineFunctionChains

.swiftlint.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ opt_in_rules:
77
- accessibility_trait_for_button
88
- anonymous_argument_in_multiline_closure
99
- array_init
10-
# async_without_await - not recognized
10+
- async_without_await
1111
# attributes
1212
# balanced_xctest_lifecycle
1313
# closure_body_length
@@ -21,7 +21,7 @@ opt_in_rules:
2121
- contains_over_first_not_nil
2222
- contains_over_range_nil_comparison
2323
# contrasted_opening_brace
24-
# convenience_type - not working with Testing framework
24+
# convenience_type
2525
- direct_return
2626
- discarded_notification_center_observer
2727
- discouraged_assert
@@ -56,6 +56,7 @@ opt_in_rules:
5656
- identical_operands
5757
- implicit_return
5858
# implicitly_unwrapped_optional
59+
# incompatible_concurrency_annotation
5960
# indentation_width
6061
- joined_default_parameter
6162
- last_where
@@ -66,7 +67,7 @@ opt_in_rules:
6667
- local_doc_comment
6768
- lower_acl_than_parent
6869
# missing_docs
69-
# modifier_order
70+
- modifier_order
7071
- multiline_arguments
7172
- multiline_arguments_brackets
7273
- multiline_function_chains
@@ -90,6 +91,8 @@ opt_in_rules:
9091
- override_in_extension
9192
- pattern_matching_keywords
9293
- period_spacing
94+
- prefer_asset_symbols
95+
- prefer_condition_list
9396
- prefer_key_path
9497
# prefer_nimble
9598
- prefer_self_in_static_references
@@ -123,7 +126,7 @@ opt_in_rules:
123126
- static_operator
124127
# strict_fileprivate
125128
- strong_iboutlet
126-
- superfluous_else
129+
# superfluous_else
127130
- switch_case_on_newline
128131
- test_case_accessibility
129132
- toggle_bool
@@ -164,14 +167,17 @@ file_length:
164167
warning: 500
165168

166169
identifier_name:
167-
excluded: [id, x, y, z]
170+
excluded: [id, ui, x, y, z, dx, dy, dz]
168171

169172
line_length:
170173
ignores_comments: true
171174

172175
nesting:
173176
type_level: 2
174177

178+
no_magic_numbers:
179+
allowed_numbers: [0.0, 1.0, 2.0, 100.0]
180+
175181
type_name:
176182
allowed_symbols: ["_"]
177183
max_length: 50
@@ -183,11 +189,11 @@ custom_rules:
183189
global_actor_attribute_order:
184190
name: "Global actor attribute order"
185191
message: "Global actor should be the first attribute."
186-
regex: "(?-s)(@.+[^,\\s]\\s+@.*Actor)"
192+
regex: "(?-s)(@.+[^,\\s]\\s+@.*Actor\\s)"
187193
sendable_attribute_order:
188194
name: "Sendable attribute order"
189195
message: "Sendable should be the first attribute."
190-
regex: "(?-s)(@.+[^,\\s]\\s+@Sendable)"
196+
regex: "(?-s)(@.+[^,\\s]\\s+@Sendable\\s)"
191197
autoclosure_attribute_order:
192198
name: "Autoclosure attribute order"
193199
message: "Autoclosure should be the last attribute."

0 commit comments

Comments
 (0)