Skip to content

Commit

Permalink
extend print misc checks to include obs_pkgs for #44
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Nov 19, 2021
1 parent bf50b32 commit 14f41c4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgcheck
Title: rOpenSci Package Checks
Version: 0.0.2.133
Version: 0.0.2.134
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
8 changes: 7 additions & 1 deletion R/pkgcheck-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ print.pkgcheck <- function (x, ...) {

pkg_env <- env2namespace ("pkgcheck")
# internal misc checks; modify condition when more checks are added
has_misc_checks <- length (x$checks$scrap) > 0L
has_misc_checks <- (length (x$checks$scrap) > 0L |
length (x$checks$obsolete_pkg_deps > 0L))
if (has_misc_checks) {
cli::cli_h2 ("Other checks")
print_check_screen (x, "has_scrap", pkg_env)
print_check_screen (x, "obsolete_pkg_deps", pkg_env)
}

# additional external checks:
Expand Down Expand Up @@ -221,6 +223,10 @@ print_check <- function (checks, what) {

print_check_screen <- function (checks, what, pkg_env) {

if (length (checks$checks [[what]]) == 0L) {
return ()
}

output_fn <- get (paste0 ("output_pkgchk_", what), envir = pkg_env)

chk_output <- do.call (output_fn, list (checks), envir = pkg_env)
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/pkgcheck",
"issueTracker": "https://github.com/ropensci-review-tools/pkgcheck/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.0.2.133",
"version": "0.0.2.134",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -311,7 +311,7 @@
"sameAs": "https://CRAN.R-project.org/package=visNetwork"
}
],
"fileSize": "1910.571KB",
"fileSize": "1910.567KB",
"developmentStatus": "https://www.repostatus.org/#concept",
"contIntegration": ["https://github.com/ropensci-review-tools/pkgcheck/actions?query=workflow%3AR-CMD-check", "https://github.com/ropensci-review-tools/pkgcheck/actions?query=workflow%3Apush-to-gitlab", "https://codecov.io/gh/ropensci-review-tools/pkgcheck"],
"relatedLink": "https://docs.ropensci.org/pkgcheck/",
Expand Down

0 comments on commit 14f41c4

Please sign in to comment.