From 6742498e8911ffcaf5a3a769cca00a564d1bac7e Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 23 Oct 2024 10:53:13 +0200 Subject: [PATCH] include in srr check output of srr:::check_stds_in_files --- DESCRIPTION | 2 +- R/srr.R | 15 +++++++++++++++ codemeta.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c4f38fc..ef2fb4f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")) diff --git a/R/srr.R b/R/srr.R index 8b85f0e..b9401b2 100644 --- a/R/srr.R +++ b/R/srr.R @@ -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) diff --git a/codemeta.json b/codemeta.json index 564b794..73feb8a 100644 --- a/codemeta.json +++ b/codemeta.json @@ -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",