Skip to content

Error with capturing groups on regexes (object_name_linter) #2188

Closed

Description

@pit00

Using capturing groups "()" in any regex string, returns Error: Linter 'object_name_linter' failed in [...]: only defined on a data frame with all numeric-alike variables

Activity

  1. MichaelChirico commented on Sep 19, 2023

    @MichaelChirico
    Collaborator

    could you provide a reprex to make it easier to support your request?

  2. added
    bug
    on Sep 19, 2023
  3. pit00 commented on Sep 19, 2023

    @pit00
    Author

    could you provide a reprex to make it easier to support your request?

    My last answer was a wrong code, here is the correct one:

    lint(
        text = "camelCase <- 1; camelCasE__ <- 2",
        linters = object_name_linter(styles = "camelCase", regexes = c(my_style = "^[a-z0-9]+([A-Z][a-z0-9]+)*[A-Z]__"))
    )
    
  4. added this to the 3.1.2 milestone on Oct 12, 2023
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions