Skip to content

Auto-detect imported objects from packages in object_usage_linter() #1136

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

Merged
merged 2 commits into from
May 16, 2022

Conversation

AshesITR
Copy link
Collaborator

Partially fixes #1127.
The example provided in the original issue is more complex because library(tidyverse) doesn't export the functions used.
Instead, it attaches other packages as a side-effect. I don't have a good idea how to (without acutally running library(...)) detect these.

IIRC, the packages aren't even registered as Depends.

@MichaelChirico
Copy link
Collaborator

IMO it's a tidyverse bug that its dependencies aren't so declared, but maybe we're missing something... added a comment to the existing bug requesting clarification:

tidyverse/tidyverse#40 (comment)

@MichaelChirico
Copy link
Collaborator

LGTM here. I'm surprised this wasn't done previously 😳

@MichaelChirico MichaelChirico merged commit f962bd0 into master May 16, 2022
@MichaelChirico MichaelChirico deleted the feature/1127-object_usage-imports branch May 16, 2022 18:34
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

Successfully merging this pull request may close these issues.

no visible global variables (object-usage-linter) is still a matter
2 participants