Applying New Lint Rules To Legacy Projects With Ease
Automate legacy code linting with GitHub Actions: create a periodic job to run Rubocop, select random files, apply safe auto-corrections & push PRs for review.
How do you apply new lint rules to the legacy project with active development? Have you added standard gem recently, and now you are required to change a lot of files but could not apply them at once. I got the same problem, and we could not add a massive amount of the small changes because it would require regular rebasing while this PR is on review, or even some safe changes could cause annoying problems. Most common solution Ask developers to add cosmetic changes for all changed files in the PR in separate commits. Which adds some problems for Code Reviewer in finding business lo...