Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint warnings "no visible global function definition" #7

Open
dasmaetthes opened this issue Jul 18, 2018 · 3 comments
Open

lint warnings "no visible global function definition" #7

dasmaetthes opened this issue Jul 18, 2018 · 3 comments

Comments

@dasmaetthes
Copy link

The warning appears on all function calls

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

lat_1 <- deg2rad(50)
@randy3k
Copy link
Member

randy3k commented Jul 18, 2018

It is a known problem of lintr r-lib/lintr#27

As a workaround, you could disable the object lintrr.

@dasmaetthes
Copy link
Author

How can I do that?

@randy3k
Copy link
Member

randy3k commented Jul 27, 2018

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
        ))
    }
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants