Skip to content

Commit

Permalink
please linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Rodrigues committed Sep 27, 2024
1 parent f7f1ac2 commit 21ab045
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/rix_init.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ rix_init <- function(project_path,
rprofile_text <- get_rprofile_text(rprofile_deparsed)

# This function creates the connection, write the text
# and closes the connexion
# and closes the connection
# Makes it "as pure as possible"
write_rprofile <- function(rprofile_text, rprofile_file, mode) {
create_rprofile_con <- function(rprofile_file, mode){
create_rprofile_con <- function(rprofile_file, mode) {
rprofile_con <- file(
rprofile_file,
open = mode,
Expand All @@ -170,7 +170,7 @@ rix_init <- function(project_path,
# Consider empty files as not existing to avoid not writing
# .Rprofile
rprofile_exists <- (file.exists(rprofile_file) &
`!=`(file.size(rprofile_file), 0))
`!=`(file.size(rprofile_file), 0))

Check warning on line 173 in R/rix_init.R

View workflow job for this annotation

GitHub Actions / style_pkg

file=R/rix_init.R,line=173,col=4,[indentation_linter] Indentation should be 24 spaces but is 4 spaces.

timestamp <- format(Sys.time(), "%Y-%m-%dT%H:%M:%S%z")
rprofile_backup <- paste0(rprofile_file, "_backup_", timestamp)
Expand Down Expand Up @@ -232,13 +232,12 @@ rix_init <- function(project_path,
action_string = "Appended", project_path = project_path
)
}
)
)

if (message_type == "verbose") {
cat("\n\n* Current lines of local `.Rprofile` are:\n\n")
cat(readLines(con = rprofile_file), sep = "\n")
}

}

#' Get character vector of length two with comment and code write `.Rprofile`
Expand Down

0 comments on commit 21ab045

Please sign in to comment.