Skip to content

Suppress large_tuple for Swift Regex #6340

Closed

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)
}

Activity

  1. changed the title [-]Suppress `large_tuple` for `Regex`[/-] [+]Suppress `large_tuple` for Swift Regex[/+] on Nov 14, 2025
  2. added
    enhancement
    good first issue
    on Nov 14, 2025
  3. SimplyDanny commented on Nov 14, 2025

    @SimplyDanny
    Collaborator

    This should be suppressible by a new option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions