-
Notifications
You must be signed in to change notification settings - Fork 122
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
Cache ignores Rubocop version and rubocop.yml
configuration.
#299
Comments
Sorry to hear that using the cache introduced this issue! Definitely wouldn't want it to mask any new cops like you described, that doesn't sound like the right behavior. Yes, I'd recommend that if the version of I probably wouldn't have time to work on something like this right now myself with current commitments but good luck with patching it! |
@zachfeldman Thanks for the reply! No worries, I'll take a look at adding this now that you've done the heavy lifting. I'm thinking the cache gets reset under these 3 scenarios:
I haven't decided how best to accomplish this but likely a hash/signature made up of all three of these and if any one of them changes, the cache gets busted or cleared. I'll keep you posted on progress... |
Hey Guys, I forked and wrote in the addition of the I noticed you were already doing this with I placed the reading of both of these files in the Besides that, I tested this out extensively in development by disabling the pruning and making various changes to see if the caches were hit or not. Everything seemed to work great. I attempted writing specs but got a little lost with how to make it work correctly. I couldn't see any pattern laid down with how you handle when We're gonna use our fork in "production" to test it more thoroughly and ensure any config or Gemfile changes won't produce false negatives. |
We ran into this when we upgraded the version of
rubocop
gem and our local ERB Linting (using--cache
) did not find any issues but our CI Linting (not using--cache
) found 56 errors.When we disabled
--cache
in our local environment, the same 56 errors appeared. If we also used--clear-cache
and then re-enabled--cache
, we found the same 56 errors as well.Thinking about it, this happens because of two reasons:
rubocop
gem..rubocop.yml
or.erb-lint.yml
configuration to enable or change existing 👮s.So I'm thinking this could be solved with two main changes:
rubocop
gem in the cache. If this is different, clear the cache before running..rubocop.yml
and.erb-lint.yml
files. If either of these are different, clear the cache before running.Related to #268 so I would love @zachfeldman's input since he masterminded this great caching feature.
Let me know your thoughts and I'm happy to take a look myself.
Thanks for the great work!
The text was updated successfully, but these errors were encountered: