We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1342aba commit 08d66cdCopy full SHA for 08d66cd
R/addins.R
@@ -3,7 +3,18 @@ addin_lint <- function() {
3
if (filename$path == "") {
4
return("Current source has no path. Please save before continue")
5
}
6
- lintr::lint(filename$path)
+
7
+ config_file <- lintr:::find_config(filename$path)
8
+ config <- read.dcf(config_file, all = T)
9
+ config_linters <- gsub("\n", "", config[["linters"]])
10
+ linters <- if (length(config_linters) == 0) {
11
+ message("No configuration found. Using default linters.")
12
+ default_linters
13
+ } else {
14
+ eval(parse(text = config_linters))
15
+ }
16
17
+ lintr::lint(filename$path, linters = linters)
18
19
20
addin_lint_package <- function() {
0 commit comments