s-fleck / dint

Compare d9dc64c ... +1 ... 2128723

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 4 files from the diff.
Other files ignored by Codecov
NEWS.md has changed.
DESCRIPTION has changed.

@@ -42,7 +42,7 @@
Loading
42 42
#' @export
43 43
qy <- function(x, quiet = FALSE){
44 44
  assert(is.character(x), "'x' must be a character vector")
45 -
  r <- vapply(x, parse_yq, integer(1), pattern = "^[^0-9]*[1-4][^0-9]*\\d{4}[^0-9]*$", USE.NAMES = FALSE)
45 +
  r <- vapply(x, parse_qy, integer(1), pattern = "^[^0-9]*[1-4][^0-9]*\\d{4}[^0-9]*$", USE.NAMES = FALSE)
46 46
47 47
  if (!quiet){
48 48
    failed <- sum(is.na(r)) - sum(is.na(x))
@@ -129,6 +129,31 @@
Loading
129 129
130 130
131 131
132 +
parse_qy <- function(x, pattern){
133 +
  if (!grepl(pattern, x)){
134 +
    return(NA_integer_)
135 +
  }
136 +
137 +
  extr <- function(string, pos, length){
138 +
    if (identical(pos, -1))
139 +
      NA_integer_
140 +
    else
141 +
      as.integer(substr(string, pos, pos + length))
142 +
  }
143 +
144 +
  pos_y <- regexpr("\\d{4}[^0-9]*$", x)
145 +
  year  <- extr(x, pos_y, 3)
146 +
  x <- strtrim(x, pos_y - 1L)
147 +
148 +
  pos_q <- regexpr("[1-4]{1}[^0-9]*", x)
149 +
  quarter <- extr(x, pos_q, 0)
150 +
151 +
  as.integer(year) * 10L + as.integer(quarter)
152 +
}
153 +
154 +
155 +
156 +
132 157
#' @inheritParams parse_yq
133 158
#' @return an `integer` scalar for as_date_ym
134 159
#' @noRd

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
R 0.07% 95.26%
Project Totals (17 files) 95.26%
Loading