Skip to content

Idea: exclusion list for noForceUnwrapInTests #2278

@nicklockwood

Description

@nicklockwood

For cases like URL(string: "literal_string")! or UnicodeScalar("a")! that will never fail, adding try XCTUnwrap(...) seems a bit heavy.

Maybe we can add an exclusion list with sensible defaults?

Or, given that the use of string literals seems to be the common factor, perhaps the option could be to ignore any force unwrap of a function with only literal parameters?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions