You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lintr::lint("a <- function() {\n 1:10 %>% sum()\n}", lintr::object_usage_linter())
# <text>:1:6: warning: [object_usage_linter] no visible global function definition for ‘%>%’. Disable this with a comment: `# nolint` (one line) or `# lintr: disable` (multiple lines). See go/tidy-style#linting for more.# a <- function() {# ^~~~~~~~~~~~
The linter anchors to the function definition, not to the usage of %>% itself. Similar goes for other infixes, e.g.
lintr::lint("a <- function() {\n 1:10 %>% sum()\n}", lintr::object_usage_linter())
# <text>:1:6: warning: [object_usage_linter] no visible global function definition for ‘:=’. Disable this with a comment: `# nolint` (one line) or `# lintr: disable` (multiple lines). See go/tidy-style#linting for more.# a <- function(x) {# ^~~~~~~~~~~~~
I guess this is codetools' fault, but is there something we can do to patch it up? Or maybe we have a bad XPath?
The text was updated successfully, but these errors were encountered:
The linter anchors to the function definition, not to the usage of
%>%
itself. Similar goes for other infixes, e.g.I guess this is
codetools
' fault, but is there something we can do to patch it up? Or maybe we have a bad XPath?The text was updated successfully, but these errors were encountered: