Skip to content

Regex lints #587

Closed
Closed
@killercup

Description

@killercup

I'm not sure whether there are lints for external crates yet, but I have some ideas for regex! (@BurntSushi might have some more.)

  • Warn that (currently) the regex! compiler macro is slower than the run time engine
  • Analyze trivial regexes and suggest std::str methods
  • Use regex-syntax to validate (static) regexes at compile time (when not using the regex! macro)
  • Recognize consecutive regex calls on the same string and suggest combining the regexes so there only needs to be one pass over the string

I'm sure these are quite hard. So, if anyone is looking for a challenge…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions