Skip to content

Conversation

NicolasCombe5555
Copy link
Contributor

@NicolasCombe5555 NicolasCombe5555 commented Sep 28, 2025

📜 Tickets

Jira ticket
Github issue

💡 Description

  • Focusing on focus-ios/ first
  • Fixing force_unwrapping rule inside /Widgets and /OpenInFocus

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@NicolasCombe5555 NicolasCombe5555 requested a review from a team as a code owner September 28, 2025 07:47
func commentDescriptionSection(desc: String) {
let count = desc.trimmingCharacters(in: .whitespacesAndNewlines).count
if count == 0 {
if count == 0 { // swiftlint:disable:this empty_count
Copy link
Contributor Author

@NicolasCombe5555 NicolasCombe5555 Sep 28, 2025

Choose a reason for hiding this comment

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

Rule does not make sense here because count is an Int

I bumped into this because my git pre-push hook wasn't allowing me to push.

Let me know if I should revert this since its unrelated.


fileprivate extension URL {
static let deepLinkURL = URL(string: "firefox-focus://widget")!
static let deepLinkURL = URL(string: "firefox-focus://widget")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

34 accepts URL?

@NicolasCombe5555 NicolasCombe5555 changed the title Refactor FXIOS-10468 [SwiftLint] Fix force_unwrapping in /Widgets Refactor FXIOS-10468 [SwiftLint] Fix force_unwrapping in /Widgets and /OpenInFocus Sep 28, 2025
private var isKlar: Bool { return (Bundle.main.infoDictionary!["CFBundleIdentifier"] as! String).contains("Klar") }
final class ActionViewController: SLComposeServiceViewController {
private var isKlar: Bool {
guard let string = Bundle.main.infoDictionary?["CFBundleIdentifier"] as? String else { return false }
Copy link
Contributor Author

@NicolasCombe5555 NicolasCombe5555 Sep 28, 2025

Choose a reason for hiding this comment

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

I saw this duplicated so adding the file in the same PR.

I was thinking of making an extension on Bundle since its duplicated but wasn't sure where, I don't think its a big deal.

Let me know if otherwise where should I add it.

Copy link
Collaborator

@Foxbolts Foxbolts left a comment

Choose a reason for hiding this comment

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

Hey @NicolasCombe5555 this looks great, thank you for taking this on!

@mobiletest-ci-bot
Copy link

🧹 Tidy commit

Just 3 file(s) touched. Thanks for keeping it clean and review-friendly!

Generated by 🚫 Danger Swift against d80f0cb

@Foxbolts Foxbolts merged commit 830ed6a into mozilla-mobile:main Sep 30, 2025
11 checks passed
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.

3 participants