lhotari commented on issue #23079: URL: https://github.com/apache/pulsar/issues/23079#issuecomment-2897743219
> @lhotari thanks i am already working on it, there are 3000+ checkstyle rule violations in broker module only and i have my final year exam coming so i am not able to give so much time to it after my exam i will give my full potential to it. @Praveen7294 no worries. there isn't a hurry in addressing this issue. It's possible that some semi-automated solution could help in dealing with it. We'd like to avoid completely reformatting the source code since that causes a lot of maintenance issues in Pulsar due to the way how we maintain Pulsar. Some background in these threads: * https://lists.apache.org/thread/j6qvt45rndnvjypcmqxsfmddqt41bxjv * https://lists.apache.org/thread/ryyfv8o33yyw9hmo5gnxn71boocn3mzs In summary, currently bug fixes are made to `master` and then cherry-picked to maintenance branches such as `branch-4.0`, `branch-3.0` and `branch-3.3` (we will drop `branch-3.3` from maintenance very soon, officially it has already ended). The problem that unnecessary structural changes cause is that cherry-picking a change will become hard due to merge conflicts, unless the maintenance branches contain the same structural changes. This does lead to the idea that perhaps we should just go with a completely automated solution such as [spotless](https://github.com/diffplug/spotless) and apply it at the same time for master and the maintenance branches, without doing any cherry-picking. An earlier argument has been that git blame would stop working, but there's now a feature since Git 2.23 to address that, `blame.ignoreRevsFile`: * https://git-scm.com/docs/git-blame#Documentation/git-blame.txt-blameignoreRevsFile * https://medium.com/@ramunarasinga/git-blame-ignore-revs-to-ignore-bulk-formatting-changes-f20ac23e6155 In Pulsar, we'd add a file `.git-blame-ignore-revs` and configure git to ignore formatting commits by adding the hash of the formatting commit to that file. Then we'd add instructions that this configuration should be activated by running `git config blame.ignoreRevsFile .git-blame-ignore-revs` in the checked out repository. @BewareMyPower WDYT about applying Spotless to the complete code base in the way described above? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
