Skip to content

Commit

Permalink
fix #41 to allow stds in tests/testthat.R
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Aug 27, 2024
1 parent 1a3c37a commit fa2a8cf
Show file tree
Hide file tree
Showing 3 changed files with 12 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: srr
Title: 'rOpenSci' Review Roclets
Version: 0.1.3.010
Version: 0.1.3.011
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
12 changes: 10 additions & 2 deletions R/roclet.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,16 @@ process_srrstats_tags <- function (tag = "srrstats", block,
}
}
ptn <- paste0 ("^.*", dir, "\\/")
fpath <- regmatches (block$file, regexpr (ptn, block$file))
fpath_full <- gsub (fpath, paste0 (dir, "/"), block$file)
if (grepl (ptn, block$file)) {
fpath <- regmatches (block$file, regexpr (ptn, block$file))
term_ptn <- "/"
} else {
# Generally only 'tests/testthat.R' where 'dir = tests/testthat'
term_ptn <- paste0 ("\\.", tools::file_ext (block$file))
ptn <- paste0 ("^.*", dir, term_ptn, "$")
fpath <- regmatches (block$file, regexpr (ptn, block$file))
}
fpath_full <- gsub (fpath, paste0 (dir, term_ptn), block$file)

msg <- paste0 (
msg, " on line#", block_line,
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/srr",
"issueTracker": "https://github.com/ropensci-review-tools/srr/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.3.010",
"version": "0.1.3.011",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit fa2a8cf

Please sign in to comment.