Lint a given file.

darwinLintFile(fileName)

Arguments

fileName

Path to file to lint

Value

list of lint objects.

Examples

darwinLintFile(
  fileName = system.file(package = "DependencyReviewer", "testScript.R")
)
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:45:81: style: [line_length_linter] Lines should not be more than 80 characters.
#>       file = "https://raw.githubusercontent.com/mvankessel-EMC/DependencyReviewerWhitelists/main/dependencies.csv",
#> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:52:21: warning: [object_usage_linter] no visible binding for global variable 'Package'
#>       dplyr::select(Package, Built) %>%
#>                     ^~~~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:52:21: warning: [object_usage_linter] no visible binding for global variable 'Package'
#>       dplyr::select(Package, Built) %>%
#>                     ^~~~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:52:30: warning: [object_usage_linter] no visible binding for global variable 'Built'
#>       dplyr::select(Package, Built) %>%
#>                              ^~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:52:30: warning: [object_usage_linter] no visible binding for global variable 'Built'
#>       dplyr::select(Package, Built) %>%
#>                              ^~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:70:81: style: [line_length_linter] Lines should not be more than 80 characters.
#>       file = "https://raw.githubusercontent.com/OHDSI/Hades/main/extras/packages.csv",
#> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:72:33: warning: [object_usage_linter] no visible binding for global variable 'name'
#>       header = TRUE) %>% select(name) %>%
#>                                 ^~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:72:33: warning: [object_usage_linter] no visible binding for global variable 'name'
#>       header = TRUE) %>% select(name) %>%
#>                                 ^~~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:72:39: style: [pipe_continuation_linter] `%>%` should always have a space before it and a new line after it, unless the full pipeline fits on one line.
#>       header = TRUE) %>% select(name) %>%
#>                                       ^~~
#> C:\Users\mvankessel\AppData\Local\R\win-library\4.2\DependencyReviewer\testScript.R:90:16: warning: [object_usage_linter] no visible binding for global variable 'package'
#>         select(package, version))
#>                ^~~~~~~