Thread (22 messages) 22 messages, 5 authors, 2020-10-16

Re: [Linux-kernel-mentees] [RFC PATCH v2] checkpatch: add shebang check to EXECUTE_PERMISSIONS

From: Miguel Ojeda <hidden>
Date: 2020-10-14 17:46:12
Also in: lkml

On Wed, Oct 14, 2020 at 10:40 AM Joe Perches [off-list ref] wrote:
Eek no.

Mindless use of either tool isn't a great thing.
That is up to opinion. I (and others) definitely want to get to the
point the kernel sources are automatically formatted, because it has
significant advantages. The biggest is that it saves a lot of time for
everyone involved.
Linux source code has generally be created with
human readability in mind by humans, not scripts.
Code readability is by definition for humans, and any code formatter
(like clang-format) is written for them.
Please don't try to replace human readable code
with mindless tools.
Please do :-)
There is a _lot_ of relatively inappropriate
output in how clang-format changes existing code
in the kernel.
Sure, but note that:

  - Code that should be specially-formatted should be in a
clang-format-off section to begin with, so it doesn't count.

  - Some people like to tweak identifiers or refactor code to make it
fit in the line limit beautifully. If you are doing that, then you
should do that for clang-format too. It is not fair to compare both
outputs when the tool is restricted on the transformations it can
perform. You can help the tool, too, the same way you can help
yourself.

  - Some style differences may be worth ignoring if the advantage is
getting automatic formatting.

Cheers,
Miguel
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help