Skip to content

no visible global variables (object-usage-linter) is still a matter #1127

Closed
@milanglacier

Description

@milanglacier

packageVersion('lintr'): ‘2.0.1.9000’
I installed lintr via github and I am at commit 4ca7e484

The following example will yield the object-usage-linter error:

library(tidyverse)

dog = function() {
    a = rnorm(5) %>% sum()
    a
}

yields no visible global function definition for ‘%>%’ object_usage_linter [4, 1]

R --version

R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions