[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Coding Style Review and Automation
On 11.02.2025 11:26, Roger Pau Monné wrote: > On Tue, Feb 11, 2025 at 09:49:54AM +0000, Luca Fancellu wrote: >> Hi Roger, >> >>>>>> >>>>>> 5) You name it. I think many people in the community can name their >>>>>> points for >>>>>> and against clang-format. >>>>> >>>>> What are the parts of our coding style that clang-format cannot >>>>> correctly represent? Could you make a list of what would need to >>>>> change in Xen coding style for it to match perfectly what clang-format >>>>> will check? >>>> >>>> we already went through that route, there is no checker anywhere that >>>> matches >>>> the Xen coding style perfectly, so it’s either we change the coding style >>>> or we >>>> don’t proceed further with any automatic check >>> >>> I'm probably fine with changing coding style, that's why I'm asking >>> for a list of what needs to be changed (unless we switch to a >>> completely different coding style). >> >> Sure, I think listing the differences is fine. >> >>> >>>>> >>>>> Ideally the first step would be to prepare a patch to adjust the >>>>> coding style so it's in line with what clang-format will do. >>>> >>>> It’s easy to say that, but difficult to implement, if we could accept the >>>> clang-format >>>> rules it would be easier to adopt the configuration itself as coding >>>> style, maybe >>>> enhanced with some comments. >>> >>> I'm kind of lost, why is it difficult to implement? What I'm asking >>> for is a patch to CODING_STYLE that modifies it in a way that we could >>> use clang-format. In any case we need to do that if we want to use >>> clang-format. >> >> Changes to the CODING_STYLE are historically difficult, given that the >> natural >> language is prone to interpretation. I’m not opposing to that, I’m just >> pointing out that >> starting changing the CODING_STYLE in order to accept the clang-format feels >> more risky and time consuming than testing clang-format and modifying the >> CODING_STYLE accordingly. > > I suggested that because it's IMO important to see the resulting > style. I'm not suggesting to modify CODING_STYLE in a single change, > it should be multiple patches that adjust the different areas that > require changes to match what clang-format can do. > > I think it's important that we can see how the final style will look > like, otherwise it's hard to compromise on intermediate seemingly > unconnected changes without knowing what the end result will be. +1 on both points. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |