Skip to content

Commit bbee376

Browse files
authored
Merge branch 'main' into codex/fix-prefer-self-shadowed-inner-type
2 parents fc95301 + 98554ca commit bbee376

52 files changed

Lines changed: 2326 additions & 460 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/actions/docker-build/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ runs:
1919
- name: Set up Docker Buildx
2020
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
2121
- name: Login to GitHub registry
22-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
22+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
2323
with:
2424
username: ${{ github.actor }}
2525
password: ${{ inputs.token }}
2626
registry: ghcr.io
2727
- name: Build and push by digest
2828
id: build
29-
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
29+
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
3030
with:
3131
context: .
3232
platforms: linux/${{ inputs.platform }}
@@ -50,7 +50,7 @@ runs:
5050
digest="${{ steps.build.outputs.digest }}"
5151
touch "/tmp/digests/${digest#sha256:}"
5252
- name: Upload digest
53-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
53+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
5454
with:
5555
name: digests-${{ inputs.platform }}
5656
path: /tmp/digests/*

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Get Swift version
2323
id: swift_version
2424
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
25-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
25+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
2626
with:
2727
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
2828
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
- name: Set up Docker Buildx
114114
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
115115
- name: Login to GitHub registry
116-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
116+
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
117117
with:
118118
username: ${{ github.actor }}
119119
password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616
with:
1717
persist-credentials: false
18-
- uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1.292.0
18+
- uses: ruby/setup-ruby@7372622e62b60b3cb750dcd2b9e32c247ffec26a # v1.302.0
1919
with:
2020
bundler-cache: true
2121
- name: Build SwiftLint and SourceKitten
@@ -27,7 +27,7 @@ jobs:
2727
- name: Get Swift version
2828
id: swift_version
2929
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
30-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
30+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
3131
with:
3232
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
3333
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
@@ -63,7 +63,7 @@ jobs:
6363
fi
6464
- name: Upload documentation
6565
if: github.event_name == 'push'
66-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
66+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
6767
with:
6868
path: docs
6969

@@ -81,4 +81,4 @@ jobs:
8181
steps:
8282
- name: Deploy documentation
8383
id: deployment
84-
uses: actions/deploy-pages@v4
84+
uses: actions/deploy-pages@v5

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929
- *checkout-step
3030
- name: Lint
31-
uses: DavidAnson/markdownlint-cli2-action@07035fd053f7be764496c0f8d8f9f41f98305101 # v22.0.0
31+
uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 # v23.0.0
3232
with:
3333
globs: |
3434
CHANGELOG.md

.github/workflows/post-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- setup-credentials
8282
- merge-into-base-branch
8383
if: ${{ !github.event.release.prerelease }}
84-
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@0bd40ad4f872b4d216d3f01bc0844ade304e2b5a # v1.1.0
84+
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@0a23c53c2baffdaf2ce8dd23c2c0e45eb3b79093 # v1.2.0
8585
permissions:
8686
contents: write
8787
with:

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
type: string
1414

1515
env:
16-
DEVELOPER_DIR: /Applications/Xcode_26.0.1.app
16+
DEVELOPER_DIR: /Applications/Xcode_26.4.app
1717
RELEASE_BRANCH: release/${{ inputs.version }}
1818
MIMALLOC_VERSION: 3.0.10
1919

@@ -76,7 +76,7 @@ jobs:
7676
ref: ${{ github.ref_name }}
7777
persist-credentials: false
7878
- name: Set up Ruby and Bundler
79-
uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1.292.0
79+
uses: ruby/setup-ruby@7372622e62b60b3cb750dcd2b9e32c247ffec26a # v1.302.0
8080
with:
8181
bundler-cache: true
8282
- name: Lint Podspec # Make sure Podspec still builds okay on CI with old release.
@@ -114,7 +114,7 @@ jobs:
114114
- name: Build binary
115115
run: make --debug spm_linux_build
116116
- name: Upload binary
117-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
117+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
118118
with:
119119
name: ${{ matrix.artifact_name }}
120120
path: .build/release/swiftlint
@@ -172,7 +172,7 @@ jobs:
172172
- name: Strip binary
173173
run: strip -s swiftlint
174174
- name: Upload artifact
175-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
175+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
176176
with:
177177
name: ${{ matrix.artifact_name }}
178178
path: |
@@ -190,7 +190,7 @@ jobs:
190190
- name: Build SwiftLint for macOS
191191
run: make --debug bazel_release
192192
- name: Upload build artifacts
193-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
193+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
194194
with:
195195
name: swiftlint-macos
196196
path: |
@@ -206,7 +206,7 @@ jobs:
206206
runs-on: windows-${{ matrix.windows-version }}
207207
env:
208208
SWIFT_VERSION: development
209-
SWIFT_BUILD: DEVELOPMENT-SNAPSHOT-2026-01-09-a
209+
SWIFT_BUILD: DEVELOPMENT-SNAPSHOT-2026-03-16-a
210210
strategy:
211211
fail-fast: false
212212
matrix:
@@ -258,7 +258,7 @@ jobs:
258258
run: |
259259
Compress-Archive -Path "artifacts/swiftlint.exe" -DestinationPath "artifacts/SwiftLint.${{ matrix.arch }}.zip" -Force
260260
- name: Setup MSBuild
261-
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2
261+
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
262262
- name: Build WiX MSI
263263
shell: pwsh
264264
run: |
@@ -273,7 +273,7 @@ jobs:
273273
-p:RunWixToolsOutOfProc=true
274274
Move-Item -Path "artifacts\SwiftLint.msi" -Destination "artifacts\SwiftLint.${{ matrix.arch }}.msi" -Force
275275
- name: Upload artifacts
276-
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
276+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
277277
with:
278278
name: swiftlint-windows-${{ matrix.arch }}
279279
path: artifacts

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Get Swift version
2525
id: swift_version
2626
run: echo "version=$(swift --version | grep '[5-9]\.[0-9]\+\(\.[0-9]\)\?' -o | head -1)" >> "$GITHUB_OUTPUT"
27-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
27+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
2828
with:
2929
key: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
3030
restore-keys: ubuntu-24.04-spm-${{ steps.swift_version.outputs.version }}-
@@ -46,12 +46,12 @@ jobs:
4646
- macOS: '15'
4747
xcode: '16.4'
4848
- macOS: '26'
49-
xcode: '26.0'
49+
xcode: '26.4'
5050
env:
5151
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app
5252
steps:
5353
- *checkout-step
54-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
54+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
5555
with:
5656
key: macos-${{ matrix.macOS }}-xcode-spm-${{ matrix.xcode }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
5757
restore-keys: macos-${{ matrix.macOS }}-xcode-spm-${{ matrix.xcode }}-
@@ -64,7 +64,7 @@ jobs:
6464
runs-on: windows-${{ matrix.windows-version }}
6565
env:
6666
SWIFT_VERSION: development
67-
SWIFT_BUILD: DEVELOPMENT-SNAPSHOT-2026-01-09-a
67+
SWIFT_BUILD: DEVELOPMENT-SNAPSHOT-2026-03-16-a
6868
strategy:
6969
fail-fast: false
7070
matrix:
@@ -84,7 +84,7 @@ jobs:
8484
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8585
with:
8686
persist-credentials: false
87-
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
87+
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
8888
with:
8989
key: windows-${{ matrix.windows-version }}-spm-${{ env.SWIFT_VERSION }}-${{ env.SWIFT_BUILD }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
9090
restore-keys: windows-${{ matrix.windows-version }}-spm-${{ env.SWIFT_VERSION }}-${{ env.SWIFT_BUILD }}-

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ disabled_rules:
5050
- todo
5151
- trailing_closure
5252
- type_contents_order
53+
- variable_shadowing
5354
- vertical_whitespace_between_cases
5455

5556
# Configurations

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
[SimplyDanny](https://github.com/SimplyDanny)
1717
[#6501](https://github.com/realm/SwiftLint/issues/6501)
1818

19+
* Add new `redundant_final` rule that detects `final` modifiers on declarations
20+
where they are redundant due to the containing context, such as `final` classes
21+
or actors. Final actors are themselves implicitly final, so the `final` modifier
22+
is redundant on them as well.
23+
[william-laverty](https://github.com/william-laverty)
24+
[SimplyDanny](https://github.com/SimplyDanny)
25+
[#6407](https://github.com/realm/SwiftLint/issues/6407)
26+
1927
* Add `discouraged_default_parameter` opt-in rule that flags default parameter
2028
values in functions with configurable access levels.
2129
[William-Laverty](https://github.com/William-Laverty)
@@ -40,8 +48,37 @@
4048
[theamodhshetty](https://github.com/theamodhshetty)
4149
[#5741](https://github.com/realm/SwiftLint/issues/5741)
4250

51+
* Add detection of cases such as `String.init(decoding: data, as: UTF8.self)` and
52+
`let text: String = .init(decoding: data, as: UTF8.self)` to
53+
`optional_data_string_conversion` rule.
54+
[nadeemnali](https://github.com/nadeemnali)
55+
[#6359](https://github.com/realm/SwiftLint/issues/6359)
56+
57+
* Add new default `invisible_character` rule that detects invisible characters
58+
like zero-width space (U+200B), zero-width non-joiner (U+200C),
59+
and FEFF formatting character (U+FEFF) in string literals, which can cause
60+
hard-to-debug issues.
61+
[kapitoshka438](https://github.com/kapitoshka438)
62+
[#6045](https://github.com/realm/SwiftLint/issues/6045)
63+
64+
* Add `variable_shadowing` rule that flags when a variable declaration shadows
65+
an identifier from an outer scope.
66+
[nadeemnali](https://github.com/nadeemnali)
67+
[#6228](https://github.com/realm/SwiftLint/issues/6228)
68+
69+
* Add `legacy_uigraphics_functions` rule to encourage the use of modern
70+
`UIGraphicsImageRenderer` instead of the legacy `UIGraphics{Begin|End}ImageContext`.
71+
The modern replacement is safer, cleaner, Retina-aware and more performant.
72+
[Dimitri Dupuis-Latour](https://github.com/DimDL)
73+
[#6268](https://github.com/realm/SwiftLint/issues/6268)
74+
4375
### Bug Fixes
4476

77+
* Detect and autocorrect missing whitespace before `else` in `guard`
78+
statements for the `statement_position` rule.
79+
[theamodhshetty](https://github.com/theamodhshetty)
80+
[#6153](https://github.com/realm/SwiftLint/issues/6153)
81+
4582
* Add an `ignore_attributes` option to `implicit_optional_initialization` so
4683
wrappers/attributes that require explicit `= nil` can be excluded from
4784
style checks for both `style: always` and `style: never`.
@@ -73,6 +110,20 @@
73110
[theamodhshetty](https://github.com/theamodhshetty)
74111
[#5917](https://github.com/realm/SwiftLint/issues/5917)
75112

113+
* Track identifiers declared in tuples to avoid false positives in the
114+
`redundant_self` rule.
115+
[SimplyDanny](https://github.com/SimplyDanny)
116+
[#6553](https://github.com/realm/SwiftLint/issues/6553)
117+
118+
* Respect existing environment variables when setting `BUILD_WORKSPACE_DIRECTORY`
119+
in build tool plugins.
120+
[SimplyDanny](https://github.com/SimplyDanny)
121+
[#6080](https://github.com/realm/SwiftLint/issues/6080)
122+
123+
* `multiline_call_arguments` no longer reports violations for enum-case patterns in
124+
pattern matching (e.g. if case, switch case, for case, catch).
125+
[GandaLF2006](https://github.com/GandaLF2006)
126+
76127
## 0.63.2: High-Speed Extraction
77128

78129
### Breaking

0 commit comments

Comments
 (0)