25
25
# [1]: https://github.com/jimhester/lintr
26
26
27
27
# Ensure that the `lintr` package is installed...
28
- if ( ! require ( ' lintr' , quietly = TRUE , character.only = TRUE ) ) {
29
- install.packages( ' lintr' , repos = ' http ://lib.stat.cmu .edu/R/CRAN /' , quiet = TRUE );
28
+ if ( ! requireNamespace ( ' lintr' , quietly = TRUE , character.only = TRUE ) ) {
29
+ install.packages( ' lintr' , repos = ' https ://archive.linux.duke .edu/cran /' , quiet = TRUE );
30
30
}
31
31
32
32
# Get only the trailing command-line arguments:
@@ -39,7 +39,7 @@ if ( n == 0L ) {
39
39
}
40
40
41
41
# Specify which linters to use...
42
- linters <- lintr :: linters_with_defaults( defaults = default_linters ,
42
+ linters <- lintr :: linters_with_defaults( defaults = lintr :: default_linters ,
43
43
# Check that no absolute paths are used:
44
44
absolute_path_linter = lintr :: absolute_path_linter(),
45
45
@@ -111,7 +111,7 @@ linters <- lintr::linters_with_defaults( defaults = default_linters,
111
111
T_and_F_symbol_linter = lintr :: T_and_F_symbol_linter(),
112
112
113
113
# Report the use of undesirable functions (e.g., `attach` or `sapply`) and suggest an alternative:
114
- undesirable_function_linter = lintr :: undesirable_function_linter( fun = within( default_undesirable_functions , rm( options ) ) ),
114
+ undesirable_function_linter = lintr :: undesirable_function_linter( fun = within( lintr :: default_undesirable_functions , rm( options ) ) ),
115
115
116
116
# Report the use of undesirable operators (e.g., `:::` or `<<-`) and suggest an alternative:
117
117
undesirable_operator_linter = lintr :: undesirable_operator_linter(),
0 commit comments