Skip to content

Commit

Permalink
include in srr check output of srr:::check_stds_in_files
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Oct 23, 2024
1 parent 936ee13 commit 6742498
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: roreviewapi
Title: Plumber API to report package structure and function
Version: 0.1.0.056
Version: 0.1.0.057
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
15 changes: 15 additions & 0 deletions R/srr.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ srr_counts <- function (repourl, repo, issue_id, post_to_issue = TRUE) {

out <- roreviewapi::srr_counts_from_report (srr_rep)

# Check any extra issues about unusual distributions of standards among
# package files:
stds_in_code <- tryCatch (
srr:::get_stds_from_code (path),
error = function (e) NULL
)
if (!is.null (stds_in_code)) {
stds_msg <- srr:::check_standards_in_files (stds_in_code, quiet = TRUE)
if (length (stds_msg) > 0L) {
stds_msg <- paste0 (":exclamation: ", stds_msg)
out <- gsub (" and may be submitted", "", out)
out <- paste0 (c (out, stds_msg), collapse = "\n")
}
}

if (post_to_issue) {

out <- roreviewapi::post_to_issue (out, repo, issue_id)
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/roreviewapi",
"issueTracker": "https://github.com/ropensci-review-tools/roreviewapi/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.0.056",
"version": "0.1.0.057",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit 6742498

Please sign in to comment.