DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Abdullah Ömer Yamaç" <aomeryamac@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Ferruh Yigit <ferruh.yigit@amd.com>,
	dev@dpdk.org
Subject: Re: [PATCH v4] devtools: add .clang-format file
Date: Wed, 15 May 2024 23:32:03 +0300	[thread overview]
Message-ID: <CA+sj1i9wmFtzR+xQ_Z5g0cpOT1WA7jckwRQJexSuDVh2P3VqYQ@mail.gmail.com> (raw)
In-Reply-To: <20240515080719.6964bf8a@hermes.local>

[-- Attachment #1: Type: text/plain, Size: 3356 bytes --]

On Wed, May 15, 2024 at 6:07 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> On Wed, 15 May 2024 09:43:22 +0100
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > On Wed, May 15, 2024 at 11:28:33AM +0300, Abdullah Ömer Yamaç wrote:
> > >    I want to update you.
> > >    On Mon, May 13, 2024 at 4:08 PM Ferruh Yigit <[1]
> ferruh.yigit@amd.com>
> > >    wrote:
> > >
> > >      On 5/8/2024 10:19 PM, Abdullah Ömer Yamaç wrote:
> > >      > clang-format is a tool to format C/C++/Objective-C code. It can
> be
> > >      used
> > >      > to reformat code to match a given coding style, or to ensure
> that
> > >      code
> > >      > adheres to a specific coding style. It helps to maintain a
> > >      consistent
> > >      > coding style across the DPDK codebase.
> > >      >
> > >      > .clang-format file overrides the default style options provided
> by
> > >      > clang-format and large set of IDEs and text editors support it.
> > >      >
> > >      > Signed-off-by: Abdullah Ömer Yamaç <[2]aomeryamac@gmail.com>
> > >      >
> > >      Hi Omer,
> > >      I tried on ethdev.c (clang-format -i ./lib/ethdev/rte_ethdev.c), I
> > >      will
> > >      highlight a few issues below (not all of them), I hope it is OK to
> > >      continue step by step, fixing these issues.
> > >      1. clang format failed for following options, not sure why, am I
> > >      using a
> > >      wrong version:
> > >      LineEnding: LF
> > >      InsertNewlineAtEOF: true
> > >      I commented them out to continue the test.
> > >      And for 'ColumnLimit', I prefer default 80 with the flexibility to
> > >      go
> > >      100 when makes sense, so I will got with 'ColumnLimit: 80'; but I
> > >      don't
> > >      want to start this discussion.
> > >
> > >    In the .editorconfig file, 100 is stated as a max_line_length.
> That's
> > >    why I prefer 100.
> > >
> >
> > +1 for keeping as 100
> >
> > >      2. Double tab indentation vs parenthesis align
> > >               if (iter->bus != NULL &&
> > >       -                       /* not in middle of rte_eth_dev
> iteration,
> > >      */
> > >       -                       iter->class_device == NULL) {
> > >       +           /* not in middle of rte_eth_dev iteration, */
> > >       +           iter->class_device == NULL) {
> > >      DPDK coding guide suggests double tab, but also accepts alignment
> by
> > >      spaces. But as far as I can see most of code has double tab.
> > >      Majority of the diff caused because of this rule.
> > >
> > >    Still, some discussions are going on
> > >
> >
> > This is one where I don't think we will were reach a consensus, and even
> if
> > we did, it would mean massive churn to DPDK. Can we have clang-format NOT
> > adjust line-continuations in a file?
>
>
> Clang format is useful on new and seriously broken code.
> Do not want to do it automatically or accept patches across all the
> current code.
>
> For indentation, can we get some setting that matches what DPDK double tab
> does?
>
It seems possible. If there is no objection, I will send a new patch with
the previous notes Ferruh stated.

> If not is there something close. Often useful to look at the other clang
> format
> pre-set styles in source.
>

[-- Attachment #2: Type: text/html, Size: 4733 bytes --]

  reply	other threads:[~2024-05-15 20:32 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 13:04 [PATCH] " Abdullah Ömer Yamaç
2024-04-29 13:32 ` Ferruh Yigit
2024-04-29 15:36   ` Stephen Hemminger
2024-04-29 15:43   ` Stephen Hemminger
2024-05-04 13:38     ` Abdullah Ömer Yamaç
2024-05-04 13:41       ` [PATCH v2] " Abdullah Ömer Yamaç
2024-05-04 16:27         ` Stephen Hemminger
2024-05-04 18:18           ` Abdullah Ömer Yamaç
2024-05-04 19:18             ` [PATCH v3] " Abdullah Ömer Yamaç
2024-05-05 16:18               ` Stephen Hemminger
2024-05-05 18:43                 ` Abdullah Ömer Yamaç
2024-05-05 16:20               ` Stephen Hemminger
2024-05-05 19:42                 ` Abdullah Ömer Yamaç
2024-05-05 20:38                   ` Stephen Hemminger
2024-05-06 10:43                     ` Abdullah Ömer Yamaç
2024-05-08 21:19                       ` [PATCH v4] " Abdullah Ömer Yamaç
2024-05-13 13:08                         ` Ferruh Yigit
2024-05-13 15:55                           ` Stephen Hemminger
2024-05-13 19:11                             ` Morten Brørup
2024-05-14  7:56                               ` Bruce Richardson
2024-05-14 16:59                                 ` Tyler Retzlaff
2024-05-15  8:28                           ` Abdullah Ömer Yamaç
2024-05-15  8:43                             ` Bruce Richardson
2024-05-15 10:19                               ` Abdullah Ömer Yamaç
2024-05-15 11:41                                 ` Bruce Richardson
2024-05-15 15:07                               ` Stephen Hemminger
2024-05-15 20:32                                 ` Abdullah Ömer Yamaç [this message]
2024-05-16  8:20                                   ` [PATCH v5] " Abdullah Ömer Yamaç
2024-05-17  9:30                                     ` Bruce Richardson
2024-10-07 17:24                                     ` Stephen Hemminger
2024-10-14 22:15                                       ` [PATCH v6] " Abdullah Ömer Yamaç
2024-10-15  3:12                                         ` Stephen Hemminger
2024-10-14 22:16                                       ` Abdullah Ömer Yamaç
2024-04-30 21:27   ` [PATCH] " Abdullah Ömer Yamaç

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+sj1i9wmFtzR+xQ_Z5g0cpOT1WA7jckwRQJexSuDVh2P3VqYQ@mail.gmail.com \
    --to=aomeryamac@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).