[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 0/2] code style exercise: Drivers folder samples
On Wed, 19 Feb 2025, Oleksandr Andrushchenko wrote: > Yes, I do agree. But only if we talk about having an automated > code style check now (which is definitely the goal at some time). > Before that we could still use the tool to take all that good that > it does and manually prepare a set of patches to fix those > code style issues which we like. Let's explore this option a bit more. Let's say that we write down our coding style in plain English by enhancing CODING_STYLE. This newer CODING_STYLE has also a corresponding clang-format configuration. Now, we cannot use clang-format to reformat everything because, as we are discovering with this example, clang-format is overzealous and changes too many things. Instead, we take "inspiration" from clang-format's output but we manually prepare a patch series to apply code style changes to Xen as the coding style today is not uniform across the code base and also not always conforming to CODING_STYLE. At this point, we have already made an improvement to CODING_STYLEe, and made the Xen coding style more uniform across the codebase. But do we also have an automated coding style checker that we can use? Can we use clang-format to check new patches coming in? Or would clang-format flag too many things as coding style errors? If it is flagging too many things as error, so we cannot use it as automated checker, is it still worth going through the exercise? Yes, we make some improvement we haven't reached the goal of having an automated code style checker.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |