Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mkoohafkan opened this issue Apr 24, 2017 · 4 comments
Closed

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

mkoohafkan opened this issue Apr 24, 2017 · 4 comments
Labels

Comments

@mkoohafkan
Copy link

@mkoohafkan mkoohafkan commented Apr 24, 2017

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$"

@mkoohafkan mkoohafkan closed this Apr 24, 2017
@mkoohafkan mkoohafkan reopened this Apr 24, 2017
@mkoohafkan
Copy link
Author

@mkoohafkan mkoohafkan commented Apr 24, 2017

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.

@hadley
Copy link
Member

@hadley hadley commented Aug 16, 2017

Were you still interested in doing the PR?

@mkoohafkan
Copy link
Author

@mkoohafkan mkoohafkan commented Aug 17, 2017

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

@hadley hadley removed the wip label Aug 18, 2017
@hadley
Copy link
Member

@hadley hadley commented Aug 18, 2017

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

@hadley hadley closed this in 202fafa Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants