You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To prevent regressions of #228 like #447, we should install SwiftLint and configure it to warn on force_unwrapping in the four framework targets, then install Danger to surface the warning. Other linting rules and the example and test bundle targets are out of scope.
I think warning on force_unwrapping is a reasonable step in this repository specifically, because this project primarily encodes and decodes data and requests and receives HTTP responses. This library is designed to give the developer as much control as possible, including control over error handling, so a force-unwrap is almost never appropriate.
Force unwrapping is almost never necessary. Or can be avoided with optional chaining/guard/defaults.
Exception:
When creating base URLs which swiftlint offers a special exception for, which can include an exception yet still verify with a quick test in CI.
To prevent regressions of #228 like #447, we should install SwiftLint and configure it to warn on
force_unwrapping
in the four framework targets, then install Danger to surface the warning. Other linting rules and the example and test bundle targets are out of scope.I think warning on
force_unwrapping
is a reasonable step in this repository specifically, because this project primarily encodes and decodes data and requests and receives HTTP responses. This library is designed to give the developer as much control as possible, including control over error handling, so a force-unwrap is almost never appropriate./cc @mapbox/navigation-ios @dmiluski
The text was updated successfully, but these errors were encountered: