Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Dec 12, 2024
1 parent 2b7a9e2 commit bbedb59
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .lintr
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
linters: all_linters(
packages = c("lintr", "etdev"),
pipe_consistency_linter(pipe = "%>%"),
line_length_linter(120),
object_name_linter = NULL,
implicit_integer_linter = NULL,
unnecessary_lambda_linter = NULL,
extraction_operator_linter = NULL,
todo_comment_linter = NULL,
library_call_linter = NULL,
Expand Down
6 changes: 3 additions & 3 deletions R/expand_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#' # Deduplicate names in list, as described in "details"
#' epi_pkg_authors <- cran_epidemiology_packages |>
#' subset(!is.na(`Authors@R`), `Authors@R`, drop = TRUE) |>
#' parse_authors_r() |>
#' parse_authors_r() |>
#' # Drop email, role, ORCID and format as string rather than person object
#' lapply(function(x) format(x, include = c("given", "family"))) |>
#' lapply(function(x) format(x, include = c("given", "family"))) |>
#' unlist()
#'
#' # With all duplicates
#' length(unique(epi_pkg_authors))
#'
#'
#' # Deduplicate
#' epi_pkg_authors_normalized <- expand_names(epi_pkg_authors, epi_pkg_authors)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/parse_authors.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#'
#' @export
parse_authors <- function(author_string) {

# Sanitize input from pkgsearch / crandb
author_string <- author_string |>
stringi::stri_replace_all_fixed(
Expand Down
2 changes: 1 addition & 1 deletion R/parse_authors_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ parse_authors_r <- function(authors_r_string) {
if (length(authors_persons) == 1) {
authors_persons <- authors_persons[[1]]
}

return(authors_persons)
}
4 changes: 2 additions & 2 deletions man/expand_names.Rd

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

8 changes: 4 additions & 4 deletions man/parse_authors.Rd

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

4 changes: 2 additions & 2 deletions man/parse_authors_r.Rd

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

0 comments on commit bbedb59

Please sign in to comment.