Skip to content

Cleanup removed files from RuboCop TODOs and rspec_order_todo.yml

Peter Leitzen requested to merge pl-prune-removed into master

What does this MR do and why?

This commit removes excludes from RuboCop TODOs and rspec_order_todo.yml for removed/non-existent files.

Done via https://gitlab.com/-/snippets/2482940.

Follow-up of !105695 (comment 1235132373).

Supersedes !108665 (merged).

How to set up and validate locally

# Check diff
git diff HEAD~

# Collect files removed
git diff HEAD~ | rg -r '$1' -o '^-\s+- (\S+)' | sort | uniq

# Check if they still exist via `stat`
git diff HEAD~ | rg -r '$1' -o '^-\s+- (\S+)'  | sort | uniq | xargs stat -c "%n" {} 2>/dev/null
# No output

# Verify by touching a removed file like `spec/models/issue_collection_spec.rb`
touch spec/models/issue_collection_spec.rb

# Run again
git diff HEAD~ | rg -r '$1' -o '^-\s+- (\S+)'  | sort | uniq | xargs stat -c "%n" {} 2>/dev/null
spec/models/issue_collection_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports

Loading