Repository navigation
warn when opening a read-only file - #2085
Conversation
| // check for roxygen token specifically | ||
| boost::regex reRoxygen( | ||
| "% Generated by roxygen2: do not edit by hand\n" | ||
| "% Please edit documentation in ([^\n]+)"); |
There was a problem hiding this comment.
Does this need to account for files that use other comment delimiters (e.g. # for NAMESPACE)?
There was a problem hiding this comment.
In this case no, since NAMESPACE files don't have a single generator that we can link the user back to. (The default check below that checks for the text 'do not edit by hand' will still catch these cases)
There was a problem hiding this comment.
Okay, sounds good. I think the roxygen2 check here might be a little too sensitive to roxygen2 changes, but I can't think of a way we can do better without substantially more plumbing (e.g. providing some mechanism for the package to give us the string and/or mining the package itself).
There was a problem hiding this comment.
I'll try and make sure we don't change accidentally — r-lib/roxygen2#709
|
Is the alternative file path a link? Have you checked the appearance with an .Rd file that has many source files? |
|
Blanket warning seems fine to me - parsing and linking seems like more work than it’s worth |

cc: #2082
Example of what this looks like when editing an
.Rdfile generated by Roxygen: