-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Refactor FXIOS-10468 [SwiftLint] Fix force_unwrapping in /Widgets and /OpenInFocus #29669
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
Conversation
func commentDescriptionSection(desc: String) { | ||
let count = desc.trimmingCharacters(in: .whitespacesAndNewlines).count | ||
if count == 0 { | ||
if count == 0 { // swiftlint:disable:this empty_count |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
34 accepts URL?
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 } |
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
🧹 Tidy commitJust 3 file(s) touched. Thanks for keeping it clean and review-friendly! Generated by 🚫 Danger Swift against d80f0cb |
📜 Tickets
Jira ticket
Github issue
💡 Description
force_unwrapping
rule inside /Widgets and /OpenInFocus📝 Checklist