Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rubocop issues with safe auto-correct #11253

Closed
Tracked by #6055
dacook opened this issue Jul 21, 2023 · 10 comments · Fixed by #11700, #12026 or #12204
Closed
Tracked by #6055

Fix Rubocop issues with safe auto-correct #11253

dacook opened this issue Jul 21, 2023 · 10 comments · Fixed by #11700, #12026 or #12204
Assignees
Labels
good first issue hackathon Issues for upcoming hackathons tech debt

Comments

@dacook
Copy link
Member

dacook commented Jul 21, 2023

Many of the issues listed in .rubocop_todo.yml can be safely auto-corrected, so we will resolve these first. This should cut the list down significantly and clear the scene before getting into more gnarly ones.

We even have a script to automatically auto-correct these, so it should be really easy! But it would be a good idea to chunk up changes and consider each one with a code review (and maybe some will require manual testing).

Process

Execute script/rubocop-autocorrect.sh for a chunk of issues. Eg for 20:

script/rubocop-autocorrect.sh -n 20

This will generate a commit for each rule, see the first PR for example: #11241

Submit PR and request code review.
To avoid the pain of merge conflicts, wait until it has been merged before starting the next one.

@RachL RachL added the hackathon Issues for upcoming hackathons label Sep 25, 2023
@sigmundpetersen sigmundpetersen moved this to To triage (By the maintainers) in Welcome New Developers! Sep 27, 2023
@dacook dacook moved this from To triage (By the maintainers) to In progress in Welcome New Developers! Sep 28, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in Welcome New Developers! Oct 24, 2023
@sigmundpetersen
Copy link
Contributor

Seems there's still work on this. Reopening

@github-project-automation github-project-automation bot moved this from Done to To triage (By the maintainers) in Welcome New Developers! Nov 9, 2023
@Hanaffi
Copy link

Hanaffi commented Nov 17, 2023

can you assign this to me please?

@sigmundpetersen
Copy link
Contributor

Sure, thank you @Hanaffi 🎉 Welcome to OFN!

@macanudo527
Copy link
Collaborator

@Hanaffi this may be finished. I was going to double check one more time. If you don't get any changes, it is probably finished.

Thanks for contributing though!

@sigmundpetersen
Copy link
Contributor

@macanudo527 I was thinking of this from #11820 :

FYI: There are approx. 300 more autocorrect errors to go.

Isn't that related to this? Or are you on working on those?
Maybe you could explain a bit about the way forward here, thanks 🙂

@macanudo527
Copy link
Collaborator

@sigmundpetersen sorry about the confusion. Rubocop reports there are 300+ left but when I ran the script it didn't make any corrections.

So either the script is broken or, more likely rubocop is reporting what can be unsafely autocorrected. I haven't had time to investigate.

In either case, thinking on it more, It's probably best only one developer be assigned to this at a time since we could easily do double work. Can you give me the weekend to wrap it up?

@Hanaffi I don't have my laptop handy but there is another issue that lists the important rubocop errors in order of priority. If you'd like to pitch in I would recommend grabbing one of those. I've been working on the rails/ offenses at the moment but there are others you could grab. If you need help, don't be afraid to @ me.

@sigmundpetersen
Copy link
Contributor

No worries @macanudo527 , thanks for the explanation.
I agree, one dev per issue 👍

@Hanaffi the issue @macanudo527 mentions is #6055 , have a look and see if there is anything you can start on there.

@macanudo527
Copy link
Collaborator

@sigmundpetersen
Indeed, rubocop was reporting unsafe autocorrects, which should probably be handled by whoever is doing the manual corrections for that offense. I recommend closing this.

@sigmundpetersen sigmundpetersen moved this from To triage (By the maintainers) to In progress in Welcome New Developers! Nov 20, 2023
@sigmundpetersen
Copy link
Contributor

@dacook should we close this? c.f. discussion above

@dacook
Copy link
Member Author

dacook commented Jan 9, 2024

Thanks for the prompt. Because it had been a couple of months, I ran the script again. A few more popped up so I've added one last PR to close it.

@github-project-automation github-project-automation bot moved this from In progress to Done in Welcome New Developers! Jan 10, 2024
@dacook dacook self-assigned this Feb 27, 2024
@github-project-automation github-project-automation bot moved this to All the things in OFN Delivery board Feb 27, 2024
@dacook dacook moved this from All the things to In Dev 💪 in OFN Delivery board Feb 27, 2024
@github-project-automation github-project-automation bot moved this from Done to To triage (By the maintainers) in Welcome New Developers! Feb 27, 2024
@github-project-automation github-project-automation bot moved this from In Dev 💪 to Dev ready 👋 in OFN Delivery board Feb 27, 2024
@github-project-automation github-project-automation bot moved this from Dev ready 👋 to Done in OFN Delivery board Feb 28, 2024
@github-project-automation github-project-automation bot moved this from To triage (By the maintainers) to Done in Welcome New Developers! Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment