Skip to content

Commit

Permalink
Document known false positive for as.POSIXct (#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored May 20, 2024
1 parent fc2268f commit e544a1a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/inner_combine_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
#' preferred so that the most expensive part of the operation ([as.Date()])
#' is applied only once.
#'
#' Note that [strptime()] has one idiosyncrasy to be aware of, namely that
#' auto-detected `format=` is set by the first matching input, which means
#' that a case like `c(as.POSIXct("2024-01-01"), as.POSIXct("2024-01-01 01:02:03"))`
#' gives different results to `as.POSIXct(c("2024-01-01", "2024-01-01 01:02:03"))`.
#' This false positive is rare; a workaround where possible is to use
#' consistent formatting, i.e., `"2024-01-01 00:00:00"` in the example.
#'
#' @examples
#' # will produce lints
#' lint(
Expand Down
8 changes: 8 additions & 0 deletions man/inner_combine_linter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e544a1a

Please sign in to comment.