atom-ide-r icon indicating copy to clipboard operation
atom-ide-r copied to clipboard

lint warnings "no visible global function definition"

Open dasmaetthes opened this issue 7 years ago • 3 comments

The warning appears on all function calls

deg2rad <- function(deg) {
   (deg * pi) / (180)
}

lat_1 <- deg2rad(50)

dasmaetthes avatar Jul 18 '18 13:07 dasmaetthes

It is a known problem of lintr https://github.com/jimhester/lintr/issues/27

As a workaround, you could disable the object lintrr.

randy3k avatar Jul 18 '18 15:07 randy3k

How can I do that?

dasmaetthes avatar Jul 24 '18 11:07 dasmaetthes

You could either use a .lintr file to disable the object linter, or specify the following setting in .Rprofile

setHook(
    packageEvent("languageserver", "onLoad"),
    function(...) {
        options(languageserver.default_linters = lintr::with_defaults(
            object_usage_linter = NULL
        ))
    }
)

randy3k avatar Jul 27 '18 07:07 randy3k