Skip to contents

Automatically detect the type of path (file, package, or directory) and apply the appropriate flir fix function.

Usage

flir_fix(path = NULL, ...)

Arguments

path

A file path, package directory path, or NULL. If NULL and running in RStudio, uses the active document path.

...

Additional arguments passed to the underlying flir fix function.

Value

Invisibly returns the result from the called flir function.

Details

The function determines the fix strategy based on the path type:

Examples

tmp <- tempfile(fileext = ".R")
writeLines("a<-1+1", tmp)
flir_fix(tmp)
#>  Fixing R code in /tmp/RtmpAM3FIu/file1b245a55b7c5.R
#>  Going to check 1 file.
#>  No fixes needed.
cat(readLines(tmp, warn = FALSE), sep = "\n")
#> a<-1+1