Skip to content

Suppress large_tuple for Swift Regex #6340

@417-72KI

Description

@417-72KI

New Issue Checklist

Feature or Enhancement Proposal

When we wrap regex literals as a function, its return type will be error by large_tuple rule.
It would be happier that some option to ignore Regex<(Substring, {multiple groups})> on large_tuple rule.

example:

func matchFooBar(in string: String) -> Regex<(Substring, foo: Substring, Substring?, bar: Substring?)>.Match? { //  <- 🚫 Tuples should have at most 2 members (large_tuple)
    try! #/content header; foo="(?<foo>.*?)"(; bar="(?<bar>.*?)")?/#
        .firstMatch(in: string)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.good first issueIssue to be taken up by new contributors yet unfamiliar with the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions