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

chore: Format projects #14664

Closed
wants to merge 2 commits into from
Closed

Conversation

nikcio
Copy link
Contributor

@nikcio nikcio commented Aug 11, 2023

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes

Description

This PR formats the Umbraco Repo. This is only white space changes and making sure variables are on separate lines + 2 places where there was ;;.

Note: A person from HQ could do this instead of this PR by running the Code cleanup tool in Visual Studio with only Format Document turned on. It really cleans up the repository in my opinion. So feel free to replace the PR if you want to 😄

@github-actions
Copy link

github-actions bot commented Aug 11, 2023

Hi there @nikcio, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@mikecp
Copy link
Contributor

mikecp commented Aug 12, 2023

Hi @nikcio,
Thanks for this clean-up. Someone if the team will handle your PR soon! They'll just need to figure out how to check all the files 😉
Cheers!

Copy link
Contributor

@JasonElkin JasonElkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I can see now are little red and green blobs 🟥🟩 but the code looks a lot better for those changes.

@JasonElkin JasonElkin self-assigned this Aug 16, 2023
@nul800sebastiaan
Copy link
Member

Good morning @nikcio! Once more coming in to turn the loud music down at the party.. 🙈 I won't close this yet, but I have concerns that I need HQ help with..

I could have sworn our contribution guidelines said something about these types of changes but it doesn't look like it any more. I think these changes are nice, and they're easily done when you have a repo with a handful of contributors. However, when you have dozens of people contributing PRs, and a complex branching strategy then we get to the law of diminishing returns: yes, the code looks nicer but it is potentially causing merge conflicts with all open existing PRs, and leads to problems when we need to merge with v12/dev, and consequently v13 and 14 (especially v4 is already hard to merge to because we're diverging a lot in that version). Apart from that, it's going to lead to more difficulty cherry picking things to v10.
So.. I've asked if HQ is up for adding more merge complexity in their lives, let's see what they say.

In the future we need to work on the contributing guidelines and for a very active repo like ours, a "only (and always) format files you touch" policy is more sensible, along with a policy to not just refactor code to make it look nicer, we love a good bug/performance fix, and we're aware our code is not always the easiest to read but equally aware that we have enough people working on it, to significantly impact their productivity if we make changes like this.

@nikcio
Copy link
Contributor Author

nikcio commented Aug 17, 2023

@nul800sebastiaan I totally didn't think about that just I just kept seeing code that was mushed together and thought it would be nice if it wasn't like that. It was simply clicking on the code clean up button and checking the files so feel free to close 😬 😅

@nul800sebastiaan
Copy link
Member

The joys of working on a big codebase with a LOT of history! 😂 😅

It's great, we've started a discussion, we might be able to come to a conclusion or at least some guidelines. 👍 I'll get back to you!

@nul800sebastiaan
Copy link
Member

Yep, got the word back that it would cause more pain than it's worth for now! Sorry about that, once again! 😅 Thanks Nikolaj!!

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.

4 participants