<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2024 at 11:43 AM Bruce Richardson <<a href="mailto:bruce.richardson@intel.com">bruce.richardson@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, May 15, 2024 at 11:28:33AM +0300, Abdullah Ömer Yamaç wrote:<br>
>    I want to update you.<br>
>    On Mon, May 13, 2024 at 4:08 PM Ferruh Yigit <[1]<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a>><br>
>    wrote:<br>
> <br>
>      On 5/8/2024 10:19 PM, Abdullah Ömer Yamaç wrote:<br>
>      > clang-format is a tool to format C/C++/Objective-C code. It can be<br>
>      used<br>
>      > to reformat code to match a given coding style, or to ensure that<br>
>      code<br>
>      > adheres to a specific coding style. It helps to maintain a<br>
>      consistent<br>
>      > coding style across the DPDK codebase.<br>
>      ><br>
>      > .clang-format file overrides the default style options provided by<br>
>      > clang-format and large set of IDEs and text editors support it.<br>
>      ><br>
>      > Signed-off-by: Abdullah Ömer Yamaç <[2]<a href="mailto:aomeryamac@gmail.com" target="_blank">aomeryamac@gmail.com</a>><br>
>      ><br>
>      Hi Omer,<br>
>      I tried on ethdev.c (clang-format -i ./lib/ethdev/rte_ethdev.c), I<br>
>      will<br>
>      highlight a few issues below (not all of them), I hope it is OK to<br>
>      continue step by step, fixing these issues.<br>
>      1. clang format failed for following options, not sure why, am I<br>
>      using a<br>
>      wrong version:<br>
>      LineEnding: LF<br>
>      InsertNewlineAtEOF: true<br>
>      I commented them out to continue the test.<br>
>      And for 'ColumnLimit', I prefer default 80 with the flexibility to<br>
>      go<br>
>      100 when makes sense, so I will got with 'ColumnLimit: 80'; but I<br>
>      don't<br>
>      want to start this discussion.<br>
> <br>
>    In the .editorconfig file, 100 is stated as a max_line_length. That's<br>
>    why I prefer 100.<br>
> <br>
<br>
+1 for keeping as 100<br>
<br>
>      2. Double tab indentation vs parenthesis align<br>
>               if (iter->bus != NULL &&<br>
>       -                       /* not in middle of rte_eth_dev iteration,<br>
>      */<br>
>       -                       iter->class_device == NULL) {<br>
>       +           /* not in middle of rte_eth_dev iteration, */<br>
>       +           iter->class_device == NULL) {<br>
>      DPDK coding guide suggests double tab, but also accepts alignment by<br>
>      spaces. But as far as I can see most of code has double tab.<br>
>      Majority of the diff caused because of this rule.<br>
> <br>
>    Still, some discussions are going on<br>
> <br>
<br>
This is one where I don't think we will were reach a consensus, and even if<br>
we did, it would mean massive churn to DPDK. Can we have clang-format NOT<br>
adjust line-continuations in a file?<br>
<br></blockquote><div>I am not an expert on clang, but it seems we don't have such a configuration. <br>There is an option called "AlignAfterOpenBracket" which horizontally aligns arguments after an open bracket.<br>if I set it to "DontAlign" then "ContinuationIndentWidth" will be active. Depending on the value of ContinuationIndentWidth, two tabs, single tabs, or spaces will be acceptable.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
/Bruce<br>
</blockquote></div></div>