Skip to content

ref: Adding missing final attribute#6987

Merged
noahsmartin merged 1 commit intomainfrom
addingFinal
Dec 5, 2025
Merged

ref: Adding missing final attribute#6987
noahsmartin merged 1 commit intomainfrom
addingFinal

Conversation

@noahsmartin
Copy link
Contributor

@noahsmartin noahsmartin commented Dec 4, 2025

Found a few places where final wasn't used and added it

#skip-changelog

Closes #6988

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.043%. Comparing base (b2295d4) to head (31ed427).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6987       +/-   ##
=============================================
- Coverage   85.076%   85.043%   -0.033%     
=============================================
  Files          453       453               
  Lines        27674     27674               
  Branches     12166     12161        -5     
=============================================
- Hits         23544     23535        -9     
+ Misses        4087      3879      -208     
- Partials        43       260      +217     
Files with missing lines Coverage Δ
Sources/Swift/Core/Helper/Log/SentryLevel.swift 100.000% <ø> (ø)
...Swift/Core/Helper/SentryBaggageSerialization.swift 100.000% <ø> (ø)
.../Swift/Core/Helper/SentryCurrentDateProvider.swift 80.000% <ø> (ø)
Sources/Swift/Core/Helper/SentryFileContents.swift 100.000% <ø> (ø)
Sources/Swift/Core/Helper/SentryInAppLogic.swift 100.000% <ø> (ø)
.../Integrations/ANR/SentryANRTrackerV2Delegate.swift 100.000% <ø> (ø)
...es/Swift/Core/Integrations/ANR/SentryANRType.swift 100.000% <ø> (ø)
...grations/Performance/SwizzleClassNameExclude.swift 100.000% <ø> (ø)
Sources/Swift/Core/MetricKit/SentryMXManager.swift 100.000% <ø> (ø)
Sources/Swift/Core/SwiftDescriptor.swift 100.000% <ø> (ø)
... and 13 more

... and 36 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2295d4...31ed427. Read the comment docs.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. Should we maybe add a linter for this. SwiftLint doesn't have anything out of the box for this, I believe, https://realm.github.io/SwiftLint/rule-directory.html, but we could do a custom linting rule with regex just for the /Sources folder

custom_rules:
avoid_background_qos_for_dispatch_queue:
name: "Avoid background QoS for dispatch queues in tests"
regex: 'qos:\s*\.background'
message: "Avoid background QoS for dispatch queues in tests, as in CI, work on dispatch queues with background QoS can take a long time to run and lead to flaky tests."
severity: error

@noahsmartin noahsmartin added the ready-to-merge Use this label to trigger all PR workflows label Dec 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.42 ms 1260.29 ms 37.88 ms
Size 24.14 KiB 1.02 MiB 1018.19 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
37900c9 1236.06 ms 1262.22 ms 26.16 ms
929c622 1228.48 ms 1253.55 ms 25.07 ms
48e5c8a 1223.02 ms 1242.38 ms 19.35 ms
a598105 1236.51 ms 1258.88 ms 22.37 ms
319fb1e 1219.48 ms 1242.69 ms 23.21 ms
e98d6f5 1228.51 ms 1258.85 ms 30.34 ms
daeb716 1215.41 ms 1246.52 ms 31.11 ms
cd67f52 1216.29 ms 1255.27 ms 38.99 ms
e8e40fd 1222.10 ms 1259.91 ms 37.80 ms
78af7a9 1225.75 ms 1256.98 ms 31.23 ms

App size

Revision Plain With Sentry Diff
37900c9 23.75 KiB 958.61 KiB 934.85 KiB
929c622 24.14 KiB 1.02 MiB 1016.90 KiB
48e5c8a 23.75 KiB 913.63 KiB 889.88 KiB
a598105 23.75 KiB 968.24 KiB 944.49 KiB
319fb1e 23.75 KiB 1019.18 KiB 995.43 KiB
e98d6f5 23.75 KiB 933.03 KiB 909.28 KiB
daeb716 23.75 KiB 928.16 KiB 904.41 KiB
cd67f52 23.75 KiB 1.01 MiB 1016.04 KiB
e8e40fd 23.75 KiB 1022.79 KiB 999.04 KiB
78af7a9 23.75 KiB 990.00 KiB 966.26 KiB

@noahsmartin
Copy link
Contributor Author

@philipphofmann I was thinking about a lint rule as well, but not sure if there is a good way for the linter to detect if a class is overridden somewhere or not (to know if final can be used without a compiler error)

@noahsmartin noahsmartin merged commit 9214f4c into main Dec 5, 2025
247 of 260 checks passed
@noahsmartin noahsmartin deleted the addingFinal branch December 5, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ref: Adding missing final attribute

2 participants