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 Rails issues #11482

Open
7 of 23 tasks
Tracked by #6055
dacook opened this issue Sep 1, 2023 · 18 comments
Open
7 of 23 tasks
Tracked by #6055

Fix Rubocop Rails issues #11482

dacook opened this issue Sep 1, 2023 · 18 comments
Assignees
Labels
epic Group of issues tech debt

Comments

@dacook
Copy link
Member

dacook commented Sep 1, 2023

We use Rubocop to standardise our code, which can improve code quality and reduce confusion. When evaluating each rule, consider if it helps with those goals or not. Often the suggested autocorrection is fine, but some cops require more consideration and there may be a better solution, or it might be appropriate to disable them, rather than create unnecessary extra work.
If unsure, please ping @openfoodfoundation/core-devs to request an opinion.

Strategy to fix issues

The normal process to fix a style issue is:

  1. Choose a cop to work on, next on the list (but ⚠️ double check there isn't already a PR addressing the cop: https://github.com/openfoodfoundation/openfoodnetwork/pulls)
  2. Remove it from .rubocop_todo.yml and run rubocop to see the error(s).
  3. Evaluate the rule, and consider applying the suggested fix if it makes sense
    • It may be helpful to commit some fixes separately, or chunked together
    • If it's not a simple fix, it may be worth simply adding a rubocop:disable comment in some cases (disable only offending line where possible)

When a cop or group of cops is complete, open a pull request.

Issues

Most/all of these will require manual fixes.
Generated 27 Feb 2024:

@dacook
Copy link
Member Author

dacook commented Sep 1, 2023

Hi @macanudo527 , I see you've started on this so created an issue for tracking.

@macanudo527
Copy link
Collaborator

@dacook Can you assign this to me?

@dacook
Copy link
Member Author

dacook commented Feb 26, 2024

Hi @macanudo527 , how have you been? I hope you've had a fulfilling start to the year!
Just wondering if you'd like to pick this up this year, or if we should unassign for now?

@macanudo527 macanudo527 removed their assignment Feb 26, 2024
@macanudo527
Copy link
Collaborator

@dacook Yeah, I've just been too busy with everything. I'd like to work on it, but just can't.

@dacook
Copy link
Member Author

dacook commented Feb 26, 2024

No problems, that's totally understandable. All the best for this season, and I hope to see you again soon!

@anthonyms
Copy link
Contributor

@dacook Kindly assign this to me.
Am I right in concluding that it is a subset of #6055?

@dacook
Copy link
Member Author

dacook commented Mar 18, 2024

Great, yep, that's correct Anthony. Good luck!

@sigmundpetersen
Copy link
Contributor

@dacook maybe we could create sub-issues of the task list in the description?
Then each issue will check itself when a PR is merged towards it.

We can create them as we go. Just click to the far right of each checkbox.

@dacook
Copy link
Member Author

dacook commented Mar 19, 2024

Thanks Sigmund. Yes I hadn't bothered with this because I wasn't sure how big each of the items was. It's possible some are so small that they don't need to have a separate issue/pr..

@Nwabor
Copy link

Nwabor commented Apr 30, 2024

@dacook I can work on some of this. Can it be assigned to me?

@Nwabor
Copy link

Nwabor commented Apr 30, 2024

@sigmundpetersen I can work on this, can it be assigned to me?

@sigmundpetersen
Copy link
Contributor

Hi and welcome @Nwabor 👋
Yes, thank you. You can work on this.
Please pick one of the open bullets in the Issue list in the description that doesn't have a PR attached.

@Nwabor
Copy link

Nwabor commented Apr 30, 2024

Thank you @sigmundpetersen.

@Nwabor
Copy link

Nwabor commented May 7, 2024

@sigmundpetersen i need access right to push my PR.

@rioug
Copy link
Collaborator

rioug commented May 7, 2024

@Nwabor you should not need right to create the PR, have a look at the documentation here : https://github.com/openfoodfoundation/openfoodnetwork/wiki/Making-a-great-pull-request . Make sure you are using your own fork.

@Nwabor
Copy link

Nwabor commented May 8, 2024

@sigmundpetersen can I pick another task, while waiting for the PR I pushed to be reviewed?

@sigmundpetersen
Copy link
Contributor

Yes, go ahead @Nwabor 👍

@Nwabor
Copy link

Nwabor commented May 8, 2024

Okay thanks, I will resolve the conflicts as well @sigmundpetersen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Group of issues tech debt
Projects
Status: Dev ready 👋
Status: In progress
Development

No branches or pull requests

6 participants