Conversation
Phase 1 of applying consistent 'best-practice' formatting rules to the ruTorrent codebase. This is a conservative set (i.e. php-cs-fixer's 'risky' rules disabled) that we can expand on as necessary. No particular fixes in mind, just trying to streamline the development workflow as activity on the codebase picks back up.
Apply consistent formatting across the code-base
This should work automatically in github, but for local development will require setting git config blame.ignoreRevsFile .git-blame-ignore-revs
|
@xirvik, this obviously needs some more work from my end, but the bones are there for configuration and ignoring the formatting commits. What's the rationale behind maintaining tests and compatibility for PHP 7.4? Its been end-of-life for almost 4 years. Happy to make another issue for that if you'd like. edit: just opened #3264 to make this process less painful. |
|
I think I'm happy to let this sit as a draft until legacy PHP support is dropped - I'm not sure the complexity/benefit ratio is there while we're still supporting older PHP versions. |
The problem with this approach is that .git-blame-ignore-revs is not automatically honored by git. You need blame.ignoreRevsFile explicitly enabled. I was considering enabling it in CI so it's mandatory for new PRs at least, which would eventually lead to something decent with a real blame, but it would take quite a while for everything to be decent. |
|
@xirvik I'm not sure I see that much of an issue with the changed git blames, but that might just be a result of my own workflow. From my perspective it seems like one extra blame to jump through, though I can see how that might be annoying. Happy to defer to you on this, both options seem reasonable to me. |
Initialises a conservative php-cs-fixer configuration to enable consistent code-styling in the code-base, applies that styling, and adds the commit hash to .git-blame-ignore-revs so that git blames aren't completely annihilated.