On 10.02.2025 22:16, Oleksandr Andrushchenko wrote: > So, in this attempt, I would suggest the following approach: > I think that I could start sending patches after the latest .clang-format 21 > for > some part of Xen, ARM code base for example, using work already done by Luca.
Taking the suggestion of limiting the experiment to Arm: On its upside it would mean non-Arm folks are unaffected. Yet that's the downside at the same time: Non-Arm folks then also are unlikely to even look at the patches. May I suggest to consider e.g. drivers/ instead? That'll involve more people (to build an opinion) while at the same time it's fewer files and less code overall. > This way: > > 1) Patches are formatted with clang-format, which is a strong plus. > 2) The diff is well maintained and I can still alter it by hand if there are > comments or dislikes. > 3) Finally, when the patch is accepted, we can be more confident that > clang-format will find far fewer inconsistencies than if it were just applied > to > the "raw" code. Thus, the next time clang-format runs, it will produce a much > smaller patch than before. > 4) Finally, introduce clang-format and run it on the leftovers: at this stage, > it would be much easier to discuss every option clang has and the resulting > output it produces. > 5) Update existing/add new rules to the Xen coding style based on community > agreements and the results of this activity. > > We may define the subsystems to start this activity on and also define an > acceptable size of the patch for review, say 100K. Considering that the longer > the review, the more outdated the patch becomes and will require a new round > as > new code comes in. Why even go as big as 100k? Style changes can literally be done at any granularity. In particular for small enough files they can be done one file at a time. For larger files there can be multiple steps (preferably all committed together, but not doing so may still be acceptable). >From the gigantic monolithic patch, would it be possible to fish out some very representative (for the changes that need making) files and start from there? Jan