solargraph icon indicating copy to clipboard operation
solargraph copied to clipboard

rubocop -a

Open apiology opened this issue 3 months ago • 0 comments

This PR was generated by this script - rerun to autogenerate (the PR will collect conflicts pretty regularly until it's merged):

  1. First, reset the branch to be the same as master:
# Error out instead of continuing
set -e
# Reset any existing commits out
git checkout rubocop_a
git fetch -a
git reset --hard origin/master
  1. apply the autocorrect:
# Tell RuboCop not to prepend unused arguments with `_`, leaving Solargraph params unlinked
gsed -i 's/^  AllowUnusedKeywordArguments: true/  Enabled: false/g' .rubocop.yml
# Tell RuboCop not to use syntax that Solargraph doesn't understand yet
yq eval '.["Style/ArgumentsForwarding"].Enabled = false' -i .rubocop.yml
yq eval '.["Style/SuperArguments"].Enabled = false' -i .rubocop.yml
# Run autocorrect and push up changes:
rm .rubocop_todo.yml
touch .rubocop_todo.yml
bundle exec rubocop -a -c .rubocop.yml || true
git checkout .rubocop.yml # revert rule change
git checkout spec/fixtures # leave these alone
bundle exec rubocop --auto-gen-config --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp
git commit -a -m "rubocop -a"
  1. Now push up and replace previous commits:
git push -f

The solargraph overcommit errors are limitations in our strong typechecking, mostly if not all addressed by other open PRs.

After this PR is merged, other PRs will need to apply step 2 before merging master in to make that merge happen smoothly.

apiology avatar Aug 30 '25 15:08 apiology

@snoe do you remember why we decided to have this restriction, I do believe we should remove it

ericdallo avatar Oct 21 '25 18:10 ericdallo