linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Kent Gibson <warthog618@gmail.com>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [libgpiod][PATCH] README: provide more info in Contributing
Date: Tue, 23 May 2023 10:02:08 +0200	[thread overview]
Message-ID: <CAMRc=Me-wp3AvGxZXC6y=t-_tWvxJ0=2sFcK6aME6nRawkqMkg@mail.gmail.com> (raw)
In-Reply-To: <CAMRc=MfmxWqMWxckwfRH-na-4GKBGd+o_wVrkRBF7UoJ+CUrQA@mail.gmail.com>

On Tue, May 23, 2023 at 9:41 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> On Tue, May 23, 2023 at 4:21 AM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > On Mon, May 22, 2023 at 06:29:27PM +0200, Bartosz Golaszewski wrote:
> > > On Sat, May 20, 2023 at 5:12 AM Kent Gibson <warthog618@gmail.com> wrote:
> > > >
> > > > Add more detail to Contributing to make it easier for new users to
> > > > contribute.
> > > >
> > > > Signed-off-by: Kent Gibson <warthog618@gmail.com>
> > > > ---
> > > > I was tempted to add something on formatting with clang-format, but I'm
> > > > not 100% clear on the formatting policy myself.
> > > > Would be nice for that to be clarified.
> > > >
> > > >  README | 14 +++++++++++---
> > > >  1 file changed, 11 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/README b/README
> > > > index b71739e..8e726fe 100644
> > > > --- a/README
> > > > +++ b/README
> > > > @@ -275,8 +275,16 @@ were selected and help2man is available in the system.
> > > >  CONTRIBUTING
> > > >  ------------
> > > >
> > > > -Contributions are welcome - please send patches and bug reports to
> > > > -linux-gpio@vger.kernel.org (add the [libgpiod] prefix to the e-mail subject
> > > > -line) and stick to the linux kernel coding style when submitting new code.
> > > > +Contributions are welcome - please send questions, patches and bug reports
> > > > +to linux-gpio@vger.kernel.org (add the [libgpiod] prefix to the e-mail
> > > > +subject line).  Note that the mailing list quietly drops HTML formatted
> > > > +e-mail, so be sure to send plain text[2].
> > > > +
> > > > +Code submissions should stick to the linux kernel coding style[3] and
> > > > +follow the kernel patch submission process[4] as applied to the libgpiod
> > > > +source tree.
> > > >
> > > >  [1] https://github.com/bats-core/bats-core
> > > > +[2] https://docs.kernel.org/process/email-clients.html
> > > > +[3] https://docs.kernel.org/process/coding-style.html
> > > > +[4] https://docs.kernel.org/process/submitting-patches.html
> > > > --
> > > > 2.40.1
> > > >
> > >
> > > Thanks for doing this. Maybe even add a link to the linux-gpio mailing
> > > list main page and archives? I sometimes get mail from people confused
> > > as to what the linux-gpio mailing list actually is.
> > >
> >
> > Fair point - will add something in v2.
> >
> > Anything to add on formatting?
> > I was going to mention clang-format, but IIRC you tweak that a bit where
> > the old way looks nicer.
>
> I used the kernel's .clang-format but in some places it resulted in
> worse readability.
>
> > FWIW I'd rather the clang-format was definitive, or if you can't get
> > what you want from clang directly, that any tweaking could be automated.
> > Essentially that there is some definitive format that can be applied by
> > a tool - I'd rather not be spending time musing over whitespace.
> >
>
> I agree. I'll revisit the kernel's format file and see if I can tweak it a bit.
>
> Until that's done let's leave it out of README though.
>
> Bart

Ah, I remember now why I hated the "official" kernel .clang-format
which the kernel doesn't even seem to use itself because this is an
example of what applying it results in:

-        static const GPIOSimLineName names[] = {
-                { .offset = 1, .name = "foo", },
-                { .offset = 2, .name = "bar", },
-                { .offset = 4, .name = "baz", },
-                { .offset = 5, .name = "xyz", },
-                { }
-        };
+        static const GPIOSimLineName names[] = { {
+                                                         .offset = 1,
+                                                         .name = "foo",
+                                                 },
+                                                 {
+                                                         .offset = 2,
+                                                         .name = "bar",
+                                                 },
+                                                 {
+                                                         .offset = 4,
+                                                         .name = "baz",
+                                                 },
+                                                 {
+                                                         .offset = 5,
+                                                         .name = "xyz",
+                                                 },
+                                                 {} };

Bart

      reply	other threads:[~2023-05-23  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20  3:11 [libgpiod][PATCH] README: provide more info in Contributing Kent Gibson
2023-05-22 16:29 ` Bartosz Golaszewski
2023-05-23  2:21   ` Kent Gibson
2023-05-23  7:41     ` Bartosz Golaszewski
2023-05-23  8:02       ` Bartosz Golaszewski [this message]

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='CAMRc=Me-wp3AvGxZXC6y=t-_tWvxJ0=2sFcK6aME6nRawkqMkg@mail.gmail.com' \
    --to=brgl@bgdev.pl \
    --cc=linux-gpio@vger.kernel.org \
    --cc=warthog618@gmail.com \
    /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).