We are linting the whole codebase using RuboCop.
This is a list of all the rules in the .rubocop_todo.yml
when we started. The checkmarks mean "this is fixed and merged to master".
If you create a PR to fix one of these, use the --only
option in RuboCop, to focus the effort on 1 kind of fix. It's so easy to get overwhelmed when reviewing code like this. (If you fix slightly more than that, no biggie. This is all about keeping the changes reviewable.)
# edit .rubocop.yml, commenting out the first line -
# this removes the "ignore the TODOs" setting
# Auto-correct with only 1 rule
rubocop -a --only Name/OfTheRuleYouAreFixing --auto-correct
# Re-generate the config file
rubocop --auto-gen-config
# Revert line 3 in .rubocop_todo.yml
# This will avoid PR conflicts
# Inspect to see if it looks OK
git diff
# Re-set the TODO list
git checkout .rubocop.yml
# Add and commit the change
git add .
git commit -m"chore: RuboCop lint Name/OfTheRuleYouAreFixing"
Removing this comment. My previous assertion was wrong. Future devs should note that .rubocop_todo.yml file when checking for violations.
The current master ref has some rubocop violations not being caught by CI. Those issues are fixed in https://github.com/lostisland/faraday/pull/870 and https://github.com/lostisland/faraday/pull/871.
Also, if PRs are named something like [RuboCop] fix Layout/TrailingBlankLines
, then they'll be much easier to add to the above checklist.
I checked off Style/GlobalVars
because the only offender is script/generate_certs
. Once the old integration tests have fully been ported, the old scripts for the integration suite can go, and this offense will be magically fixed. Any other global vars added elsewhere should continue to be flagged as rubocop offenses.
I hadn't seen this post before I fixed the Style/Globalvars
:man_shrugging:
Thanks, everyone! 🚀
Most helpful comment
Thanks, everyone! 🚀