From 9be2a0823fb230340978574dccde26fb0a006094 Mon Sep 17 00:00:00 2001
From: IndrajeetPatil Examples#> $expressions
#> $expressions[[1]]
#> $expressions[[1]]$filename
-#> [1] "/tmp/RtmpVnxWsC/file173b52be4ff0"
+#> [1] "/tmp/Rtmpg3LDxu/file16b94ba497a4"
#>
#> $expressions[[1]]$line
#> [1] 1
@@ -170,8 +170,8 @@
Examples#> res
#> else unname(res)
#> }
-#> <bytecode: 0x5579af35a428>
-#> <environment: 0x5579a5d72cd8>
+#> <bytecode: 0x5600e07613e0>
+#> <environment: 0x5600d66bcba8>
#>
#> $expressions[[1]]$content
#> [1] "x <- 1"
@@ -179,7 +179,7 @@
Examples#>
#> $expressions[[2]]
#> $expressions[[2]]$filename
-#> [1] "/tmp/RtmpVnxWsC/file173b52be4ff0"
+#> [1] "/tmp/Rtmpg3LDxu/file16b94ba497a4"
#>
#> $expressions[[2]]$line
#> [1] 2
@@ -223,8 +223,8 @@
Examples#> res
#> else unname(res)
#> }
-#> <bytecode: 0x5579af35a428>
-#> <environment: 0x5579a5d6a680>
+#> <bytecode: 0x5600e07613e0>
+#> <environment: 0x5600d65e4260>
#>
#> $expressions[[2]]$content
#> [1] "y <- x + 1"
@@ -232,7 +232,7 @@
Examples#>
#> $expressions[[3]]
#> $expressions[[3]]$filename
-#> [1] "/tmp/RtmpVnxWsC/file173b52be4ff0"
+#> [1] "/tmp/Rtmpg3LDxu/file16b94ba497a4"
#>
#> $expressions[[3]]$file_lines
#> 1 2
@@ -285,8 +285,8 @@
Examples#> res
#> else unname(res)
#> }
-#> <bytecode: 0x5579af35a428>
-#> <environment: 0x5579a5d61950>
+#> <bytecode: 0x5600e07613e0>
+#> <environment: 0x5600d657dc38>
#>
#> $expressions[[3]]$terminal_newline
#> [1] TRUE
diff --git a/dev/reference/lint.html b/dev/reference/lint.html
index b501e0136..57ae5116c 100644
--- a/dev/reference/lint.html
+++ b/dev/reference/lint.html
@@ -182,10 +182,10 @@
Examples
f <- tempfile()
writeLines("a=1", f)
lint(f) # linting a file
-#> /tmp/RtmpVnxWsC/file173b1162aca6:1:2: style: [assignment_linter] Use <-, not =, for assignment.
+#> /tmp/Rtmpg3LDxu/file16b957e8c6e6:1:2: style: [assignment_linter] Use <-, not =, for assignment.
#> a=1
#> ^
-#> /tmp/RtmpVnxWsC/file173b1162aca6:1:2: style: [infix_spaces_linter] Put spaces around all infix operators.
+#> /tmp/Rtmpg3LDxu/file16b957e8c6e6:1:2: style: [infix_spaces_linter] Put spaces around all infix operators.
#> a=1
#> ^
lint("a = 123\n") # linting inline-code
diff --git a/dev/reference/read_settings.html b/dev/reference/read_settings.html
index b6450873e..592c3291e 100644
--- a/dev/reference/read_settings.html
+++ b/dev/reference/read_settings.html
@@ -97,7 +97,21 @@
Details
or the environment variable
R_LINTR_LINTER_FILE
This file is a DCF file, see base::read.dcf()
for details.
Here is an example of a .lintr
file:
linters: linters_with_defaults(
+ any_duplicated_linter(),
+ any_is_na_linter(),
+ backport_linter("oldrel-4", except = c("R_user_dir", "str2lang")),
+ line_length_linter(120L),
+ missing_argument_linter(),
+ unnecessary_concatenation_linter(allow_single_expression = FALSE),
+ yoda_test_linter()
+ )
+exclusions: list(
+ "inst/doc/creating_linters.R" = 1,
+ "inst/example/bad.R",
+ "tests/testthat/default_linter_testcode.R",
+ "tests/testthat/dummy_packages"
+ )
Experimentally, we also support keeping the config in a plain R file. By default we look for
a file named .lintr.R
(in the same directories where we search for .lintr
).
We are still deciding the future of config support in lintr, so user feedback is welcome.
diff --git a/dev/reference/trailing_blank_lines_linter.html b/dev/reference/trailing_blank_lines_linter.html
index 55dc17dca..e5bd2e5f2 100644
--- a/dev/reference/trailing_blank_lines_linter.html
+++ b/dev/reference/trailing_blank_lines_linter.html
@@ -83,7 +83,7 @@