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

Include permissions in file cache #4469

Closed
DanielRussell opened this issue Jun 5, 2017 · 0 comments
Closed

Include permissions in file cache #4469

DanielRussell opened this issue Jun 5, 2017 · 0 comments
Labels

Comments

@DanielRussell
Copy link

Note: this was first hinted at in a comment from @sonalkr132 in PR #4342

Expected behavior

After updating a file's permissions, the Link/ScriptPermission cop would no longer fire.

Actual behavior

After updating a file's permissions, the Link/ScriptPermission cop continues to fire unless the cache is disabled via -C false, or the cache contents are deleted.

Steps to reproduce the problem

echo '#!/usb/bin/env ruby' > foo.rb
rubocop foo.rb #  output: foo.rb:1:1: W: Script file foo.rb doesn't have execute permission.
chmod +x foo.rb
rubocop foo.rb #  output: foo.rb:1:1: W: Script file foo.rb doesn't have execute permission.
rubocop -C false foo.rb # output: 1 file inspected, no offenses detected
# Another way
find ~/.cache/rubocop_cache/ -type f -mmin -5 -exec rm {} \;
rubocop foo.rb # output: 1 file inspected, no offenses detected

RuboCop version

0.49.1 (using Parser 2.4.0.0, running on ruby 2.4.1 x86_64-darwin16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants