IndrajeetPatil / statsExpressions

Tidy data frames and expressions with statistical summaries 📜
https://indrajeetpatil.github.io/statsExpressions/
Other
312 stars 20 forks source link

Check for new lints and following kebab-case for naming R files #260

Closed IndrajeetPatil closed 8 months ago

IndrajeetPatil commented 10 months ago

The code used for the latter:

library(fs)
library(stringr)
library(dplyr)
library(purrr)

old_full_file_names <- dir_ls(recurse = TRUE, glob = "*.R")
extract_file_names <- function(filenames) {
  filenames %>%
    basename() %>%
    tools::file_path_sans_ext()
}

old_filenames <- extract_file_names(old_full_file_names)
new_filenames <- stringr::str_replace_all(old_filenames, "_", "-")

new_full_file_names <- purrr::pmap_chr(
  list(old_full_file_names, old_filenames, new_filenames),
  stringr::str_replace
) %>%
  unname()

purrr::walk2(
  old_full_file_names,
  new_full_file_names,
  ~ fs::file_move(.x, .y)
)
codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (325c48d) 100.00% compared to head (5d61b96) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #260 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 14 14 Lines 495 495 ========================================= Hits 495 495 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.