Skip to content

rubocop -a#1053

Open
apiology wants to merge 1368 commits intocastwide:v0.59from
apiology:rubocop_a
Open

rubocop -a#1053
apiology wants to merge 1368 commits intocastwide:v0.59from
apiology:rubocop_a

Conversation

@apiology
Copy link
Contributor

@apiology apiology commented Aug 30, 2025

Autocorrect rubocop violations. This took our todo file down by 700+ lines, to ~550 lines total:

image

Builds upon:

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

  1. Update Rubocop manual fixes #1154 if needed
  2. Reset the branch to be the same as the previous:
# Error out instead of continuing
set -e
git checkout rubocop_a
git fetch -a
git reset --hard 2026-01-27
  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 --exclude-limit 5 --no-offense-counts --no-auto-gen-timestamp
git commit --no-verify -a -m "rubocop -a"
  1. Push up and replace previous commits:
git push -f
  1. Manually fix typechecking errors reported in CI

  2. Check in fixes if they pass

bundle exec solargraph typecheck --level=strong && git commit -a -m "manual typechecking fixes"

After this PR is merged, other PRs will need to do the 'Apply the autocorrect' step before merging master in to make that merge happen smoothly.

@apiology apiology force-pushed the rubocop_a branch 5 times, most recently from 752d955 to 7fdc00f Compare August 31, 2025 00:49
@apiology apiology marked this pull request as ready for review August 31, 2025 01:01
@apiology apiology force-pushed the rubocop_a branch 2 times, most recently from cdfacc5 to 2cd6522 Compare September 7, 2025 20:51
@apiology apiology force-pushed the rubocop_a branch 2 times, most recently from 007da03 to 15225c3 Compare September 23, 2025 13:50
…:apiology/solargraph into fix_directive_combination_issue
Use our generated RBS signature from parameters as a key to combine
method signatures from RBS/YARD pins.

This is closer to what RBS does than the current technique of using
the arity alone, and fixes a key degenerate case in Integer#+ revealed
by updated definitions used by recently released RBS gems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants