Skip to content

Check file extension when identifying files in R to roxygenise #625

Closed

Description

@mkoohafkan

If a user does something silly like leave old documented code files in the R folder, but with the extension .oldR, otheR, etc. (such as I sometimes do when rewriting functions) Roxygen will still parse the Roxygen comments in those files, potentially leading to namespace weirdness. I'm guessing there's a regex call to blame that searches for "r$" rather than "\.r$"

Activity

  1. mkoohafkan commented on Apr 24, 2017

    @mkoohafkan
    Author

    I think it's a simple fix to change this line from

    sort_c(dir(file.path(path, "R"), "[.Rr]$", full.names = TRUE))

    to

    sort_c(dir(file.path(path, "R"), "\\.[Rr]$", full.names = TRUE))

    I'll test it and submit a pull request later.

  2. hadley commented on Aug 16, 2017

    @hadley
    Member

    Were you still interested in doing the PR?

  3. added
    featurea feature request or enhancement
    wipwork in progress
    on Aug 16, 2017
  4. mkoohafkan commented on Aug 17, 2017

    @mkoohafkan
    Author

    Sorry, completely forgot---yes, but I won't be able to do it until September (away from computer)

  5. hadley commented on Aug 18, 2017

    @hadley
    Member

    Ok, in that case I'll just do myself since it's so small :)

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

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions