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
Add ability to globally disable caching #12706
Comments
Per https://docs.rubocop.org/rubocop/configuration.html reading from I maintain my assertion that if Rubocop is going to write outside the project tree, then it must accept config from outside the project tree as well. Perhaps an ENV var? Per https://github.com/rubocop/rubocop/blob/master/lib/rubocop/cache_config.rb#L8 setting |
What about the |
I have, but the spirit of the request is for when I forget about this behavior and don't remember I need to add a flag or tune the project config file. I'm looking for something I can set in my home directory or bashrc to configure Rubocop to stay within the project tree. The problem with a command line argument is I often run Rubocop from Make or bundler, and bundler (apparently) doesn't use bash aliases so I can't alias rubocop="rubocop --cache-false" in my .bashrc. I actually just realized that there is a simple, supported solution to this: My grouse isn't with the caching itself, it's with the default cache directory being outside the project tree. As this caching feature has been around for a while and nobody else is asking for a global disable option I think we can close this. I found a solution to my concern. And for the record |
Is your feature request related to a problem? Please describe.
While backing up my system today I noticed Rubocop writing into
~/.cache
. I find this behavior undesirable as I try to keep my code and it's dependencies tightly contained in working directories, it's never pleasant to find when a tool escapes where I put it and begins writing to other paths on my filesystem. I found the documentation at https://docs.rubocop.org/rubocop/usage/caching.html, but I was disappointed to see that this option, which writes outside the per-project tree, is currently only settable in per-project config. I'm not looking forward to having to remember to turn this off on every project I work on.Describe the solution you'd like
As Rubocop has is writing outside the bounds of the project tree, please add a config file that reads from outside the project tree where environmental options like this can be globally specified. For this case I'm not seeking any deep configs so a simple read and merge should be sufficient.
Describe alternatives you've considered
Per https://docs.rubocop.org/rubocop/usage/caching.html there aren't any.
chmod 000 ~/.cache/rubocop_cache
I guess?The text was updated successfully, but these errors were encountered: