mikldk / roxytest

Inline testthat tests with roxygen2
95 stars 3 forks source link

Rstudio: CTRL+SHIFT+D option cannot run roclets #5

Closed mikldk closed 4 years ago

mikldk commented 4 years ago

Wish: Rstudio: CTRL+SHIFT+D option to run devtools::document()/roxygen2::roxygenise() instead of devtools::document(roclets=c('rd', 'collate', 'namespace'))

mikldk commented 4 years ago

See also https://github.com/rstudio/rstudio/issues/5201.

mikldk commented 4 years ago

Maybe this can be solved by an Rstudio add-in:

Add file inst/rstudio/addins.dcf with content like this (from https://github.com/r-lib/devtools/blob/master/inst/rstudio/addins.dcf):

Name: Report test coverage for a package
Description: Calculate and report the test coverage for the current package, using `devtools::test_coverage()`.
Binding: test_coverage
Interactive: false
mikldk commented 4 years ago

See the proposed addin PR at https://github.com/r-lib/devtools/pull/2188 .

mikldk commented 4 years ago

PR was merged in r-lib/devtools@919b3f474a82dcaf9bcabc0c60919ea5a0a424f3.

mikldk commented 4 years ago

And is included in devtools 2.2.0: see link.

mikldk commented 4 years ago

For now we need to use devtools' addin and redefine keyboard shortcut.