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

ignore library path for renv and packrat #562

Closed
colearendt opened this issue Nov 8, 2019 · 3 comments · Fixed by #568
Closed

ignore library path for renv and packrat #562

colearendt opened this issue Nov 8, 2019 · 3 comments · Fixed by #568

Comments

@colearendt
Copy link

When using tools like renv or packrat, styler seems to be going through the entire library by default (and styling all of the R packages in use).

By default, styler should probably either:

  • ignore .libPaths() folders
  • be savvy about recognizing a library of R packages (and ignore)
@lorenzwalthert
Copy link
Collaborator

lorenzwalthert commented Nov 8, 2019

thanks. Are you talking about the style_dir() API or which function?
Related as far as file filtering goes: #515
I don't think we can easily or should use .libPaths(). But we could potentially ignore renv and packrat directories.

@colearendt
Copy link
Author

Yes, I believe it was style_dir() that gave me this behavior. Ignoring renv / packrat would work just fine - I was hoping there was a more generic implementation (lest some other package have the same behavior). However, renv / packrat is simple enough and solves the need 😄

@lorenzwalthert
Copy link
Collaborator

I think we better add an argument exclude_dirs to style_dir() and make the default such that packrat and renv are ignored, so it's transparent to the end user what happens.

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

Successfully merging a pull request may close this issue.

2 participants