workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Miguel Ojeda <ojeda@kernel.org>, dan.j.williams@intel.com
Cc: corbet@lwn.net, gregkh@linuxfoundation.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux@roeck-us.net, max.kellermann@ionos.com,
	workflows@vger.kernel.org
Subject: Re: [PATCH v3] Documentation/process/coding-style.rst: space around const
Date: Thu, 12 Oct 2023 07:48:25 -0700	[thread overview]
Message-ID: <e212997cf8b05608718fb6ac1766c390255664ac.camel@perches.com> (raw)
In-Reply-To: <20231012115039.1680561-1-ojeda@kernel.org>

On Thu, 2023-10-12 at 13:50 +0200, Miguel Ojeda wrote:
> On Wed, 11 Oct 2023 14:44:17 -0700, Dan Williams wrote:
> > 
> > I notice that clang-format reflows that example to:
> > 
> >     const void *a;
> >     void *const b;
> >     void **const c;
> >     void *const *const d;
> >     int strcmp(const char *a, const char *b);
> > 
> > ...but someone more clang-format savvy than me would need to propose the
> > changes to the kernel's .clang-format template to match the style
> > suggestion.
> 
> I think we could use:
> 
>     diff --git a/.clang-format b/.clang-format
>     index 0bbb1991defe..9eeb511c0814 100644
>     --- a/.clang-format
>     +++ b/.clang-format
>     @@ -671,6 +671,7 @@ SortIncludes: false
>      SortUsingDeclarations: false
>      SpaceAfterCStyleCast: false
>      SpaceAfterTemplateKeyword: true
>     +SpaceAroundPointerQualifiers: Both
>      SpaceBeforeAssignmentOperators: true
>      SpaceBeforeCtorInitializerColon: true
>      SpaceBeforeInheritanceColon: true
> 
> At least that makes it match the documentation example -- I got this:
> 
>     const void *a;
>     void * const b;
>     void ** const c;
>     void * const * const d;
>     int strcmp(const char *a, const char *b);
> 
> But it is only supported in version >= 12, so we need to wait for the
> minimum LLVM version bump.

Do older versions of clang-format ignore entries
they don't understand?


  reply	other threads:[~2023-10-12 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 12:58 Max Kellermann
2023-10-10 19:24 ` Greg KH
2023-10-10 23:46 ` Guenter Roeck
2023-10-11  0:45 ` Joe Perches
2023-10-11 21:44 ` Dan Williams
2023-10-12 11:50   ` Miguel Ojeda
2023-10-12 14:48     ` Joe Perches [this message]
2023-10-12 16:53       ` Miguel Ojeda

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=e212997cf8b05608718fb6ac1766c390255664ac.camel@perches.com \
    --to=joe@perches.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=max.kellermann@ionos.com \
    --cc=ojeda@kernel.org \
    --cc=workflows@vger.kernel.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