Skip to content

Commit b455fc7

Browse files
committed
fix: avoid using desc::
1 parent 55926db commit b455fc7

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

R/package_codedoc.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_PACKAGE"
77

88
# @codedoc_comment_block R_package_description(codedoc)
9-
# ${desc::desc_get_field("Description")}
9+
# ${read.dcf(file = "DESCRIPTION", fields = "Description")[1L, 1L]}
1010
#
1111
# <!-- badges: start -->
1212
# [![R-CMD-check](https://github.com/FinnishCancerRegistry/codedoc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/FinnishCancerRegistry/codedoc/actions/workflows/R-CMD-check.yaml)

R/pkg_doc.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,10 @@ pkg_doc_package_description <- function(
276276
stopifnot(inherits(desc_arg_list, c("NULL", "list")))
277277
desc_arg_list <- as.list(desc_arg_list)
278278
if (!"R_package_name" %in% names(desc_arg_list)) {
279-
desc_arg_list[["R_package_name"]] <- desc::desc_get_field("Package")
279+
desc_arg_list[["R_package_name"]] <- read.dcf(
280+
file = "DESCRIPTION",
281+
fields = "Package"
282+
)[1L, 1L]
280283
}
281284

282285
#' @param news_arg_list `[NULL, list]` (default `NULL`)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# Package `codedoc`
55

66

7-
Allows generation of documentation from specifically formatted code comments.
7+
Allows generation of documentation from specifically
8+
formatted code comments.
89

910
<!-- badges: start -->
1011
[![R-CMD-check](https://github.com/FinnishCancerRegistry/codedoc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/FinnishCancerRegistry/codedoc/actions/workflows/R-CMD-check.yaml)

man/codedoc-package.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)