-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
New hook: parsable-roxygen #562
Comments
Good idea. So are you not source tracking |
My case is actually a bit unusual... I'm not working with a package, but rather, a repo containing {box} modules (there are more details in this blog post, if you're interested!). So my process looks something like:
This has two advantages:
I wonder if anyone else is doing anything this convoluted to build their docs... 😅 |
Is your feature request related to a problem? Please describe.
R developers often writes documentation in the form of "roxygen comments", in the same file as their code. If the syntax of that commentary is wrong,
roxygen2::roxygenise()
will throw an error. It can be frustrating when automated builds fail for this reason.In my particular case, I have a GitHub Action which calls
roxygenise()
on a set of R files, and then uses the output files for a static documentation site - i.e. in theory there is no need to runroxygenise()
to generate output files locally.Describe the solution you'd like
We could create a relatively simple hook, à la
parsable-R
, to check that R scripts can be parsed successfully withroxygen2::parse_file()
.Describe alternatives you've considered
One can run
roxygenise()
locally to check that it won't error, and then delete any generated output files from the local machine.Additional context
I don't think this would be too tricky to add - the logic is almost identical to
parsable-R
, except usingroxygen2::parse_file()
instead ofbase::parse()
. There is an extra dependency of {roxygen2} of course.I can open a PR containing my prototype of
parsable-roxygen
, which currently lives in a private repo 😇The text was updated successfully, but these errors were encountered: