Skip to content

Commit

Permalink
fixing bug with missing config file (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
ha0ye authored and jimhester committed Nov 13, 2017
1 parent 79eaa32 commit 9c92345
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions R/addins.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ addin_lint <- function() {
}

config_file <- lintr:::find_config(filename$path)
config <- read.dcf(config_file, all = T)
config_linters <- gsub("\n", "", config[["linters"]])
if (length(config_file) == 0) {
config_linters <- NULL
} else {
config <- read.dcf(config_file, all = T)
config_linters <- gsub("\n", "", config[["linters"]])
}
linters <- if (length(config_linters) == 0) {
message("No configuration found. Using default linters.")
default_linters
Expand Down

0 comments on commit 9c92345

Please sign in to comment.