Skip to content

Fix false positives in redundant_discardable_let rule #6075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaseken
Copy link
Contributor

@kaseken kaseken commented May 11, 2025

Fixes #6063

I’d appreciate any feedback or suggestions. Thanks in advance for your time and review!

Changes

  • Fix false positive for @ViewBuilder functions when ignore_swiftui_view_bodies is set to true.
  • Fix false positive for #Preview when ignore_swiftui_view_bodies is set to true.
  • Fix false positive for PreviewProvider when ignore_swiftui_view_bodies is set to true.

@kaseken kaseken force-pushed the fix-false-positive-on-redundant-discardable-let branch from 404eae5 to df6e395 Compare May 11, 2025 08:57
@SwiftLintBot
Copy link

SwiftLintBot commented May 11, 2025

1 Warning
⚠️ This PR may need tests.
18 Messages
📖 Building this branch resulted in a binary size of 25052.9 KiB vs 25052.16 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.23 s vs 0.18 s on main (27% slower).
📖 Linting Alamofire with this PR took 0.17 s vs 0.17 s on main (0% slower).
📖 Linting Brave with this PR took 0.73 s vs 0.73 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 5.11 s vs 5.14 s on main (0% faster).
📖 Linting Firefox with this PR took 0.98 s vs 0.98 s on main (0% slower).
📖 Linting Kickstarter with this PR took 0.73 s vs 0.73 s on main (0% slower).
📖 Linting Moya with this PR took 0.13 s vs 0.13 s on main (0% slower).
📖 Linting NetNewsWire with this PR took 0.29 s vs 0.29 s on main (0% slower).
📖 Linting Nimble with this PR took 0.15 s vs 0.15 s on main (0% slower).
📖 Linting PocketCasts with this PR took 0.69 s vs 0.7 s on main (1% faster).
📖 Linting Quick with this PR took 0.13 s vs 0.13 s on main (0% slower).
📖 Linting Realm with this PR took 0.42 s vs 0.42 s on main (0% slower).
📖 Linting Sourcery with this PR took 0.28 s vs 0.28 s on main (0% slower).
📖 Linting Swift with this PR took 0.44 s vs 0.43 s on main (2% slower).
📖 Linting VLC with this PR took 0.2 s vs 0.2 s on main (0% slower).
📖 Linting Wire with this PR took 1.76 s vs 1.77 s on main (0% faster).
📖 Linting WordPress with this PR took 1.01 s vs 0.99 s on main (2% slower).

Generated by 🚫 Danger

- Fix false positive for @ViewBuilder functions when ignore_swiftui_view_bodies is set to true.
- Fix false positive for #Preview when ignore_swiftui_view_bodies is set to true.
- Fix false positive for PreviewProvider when ignore_swiftui_view_bodies is set to true.
@kaseken kaseken force-pushed the fix-false-positive-on-redundant-discardable-let branch from 2026c39 to bfa6e9b Compare May 16, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive on redundant_discardable_let rule in SwiftUI @ViewBuilder
2 participants