-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
rubocop: Discourage the use of rm_f
and rm_rf
in formulae and casks
#17705
Merged
Commits on Aug 1, 2024
-
rubocop: Discourage the use of
FileUtils.rm_rf
- This cop checks for the use of `FileUtils.rm_rf` and suggests using `FileUtils.rm_r` because we should know if we couldn't delete a thing for some reason, not just force it.
Configuration menu - View commit details
-
Copy full SHA for e6976ae - Browse repository at this point
Copy the full SHA e6976aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4e4808 - Browse repository at this point
Copy the full SHA f4e4808View commit details -
Configuration menu - View commit details
-
Copy full SHA for ebd9d18 - Browse repository at this point
Copy the full SHA ebd9d18View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc77846 - Browse repository at this point
Copy the full SHA cc77846View commit details -
rubocop/no_fileutils_rmrf: Discourage
Pathname#rmtree
too- This [seems to be](https://ruby-doc.org/3.3.4/exts/pathname/Pathname.html#method-i-rmtree) equivalent to `FileUtils#rm_r`, so replace it with that.
Configuration menu - View commit details
-
Copy full SHA for 14dd359 - Browse repository at this point
Copy the full SHA 14dd359View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99c5cc9 - Browse repository at this point
Copy the full SHA 99c5cc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0889df8 - Browse repository at this point
Copy the full SHA 0889df8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e21fb - Browse repository at this point
Copy the full SHA 83e21fbView commit details -
rubocops/no_fileutils_rmrf: Fix
rmtree
on a method returning Pathname- Tidy up the node matchers. Either `FileUtils.rm_rf` or `rm_rf` on a `Pathname` instance or `self`.
Configuration menu - View commit details
-
Copy full SHA for 7404735 - Browse repository at this point
Copy the full SHA 7404735View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0872966 - Browse repository at this point
Copy the full SHA 0872966View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.