All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] clang-format with examples
@ 2025-03-01 11:42 Oleksandr Andrushchenko
  2025-03-01 11:42 ` [PATCH 1/4] Add .clang-format files to enable manual coding style checks Oleksandr Andrushchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Oleksandr Andrushchenko @ 2025-03-01 11:42 UTC (permalink / raw)
  To: xen-devel
  Cc: andr2000, sstabellini, Artem_Mygaiev, jbeulich, Luca.Fancellu,
	roger.pau, marmarek, andrew.cooper3, anthony.perard


Hello, everybody!

In order to continue activity started at [1] I am sending this series
which allows to manually run coding style checks and does not provide
any automation yet.

Only the first patch is the goal of this series and patches 2-4 are for
example only.

This proposal disables coding style checks for the project, but xen/
folder: this is done by providing a global .clang-format at the project
top level which disables clang-format and only providing .clang-format
for xen/ folder.

clang-format version expected to be >15 and the latest tool can be
installed with:
python3 -m pip install clang-format
This allows having the tool without the need to compile or install
anything else.

As no automatic code style checks are performed, so all those can be
run manually:

- to see changes proposed to the patch being worked on (not committed yet):
git-clang-format --diff --style=file --verbose

- to run code formatting on the HEAD patch:
git-clang-format --style=file --verbose HEAD~1

Provided xen/.clang-format still has a lot of comments gathered from the
previous discussions. This is for purpose of better seeing why some of
the options have their values. Once option values are accepted all those
comments can be removed.

Stay safe,
Oleksandr Andrushchenko

[1] https://lists.xen.org/archives/html/xen-devel/2025-02/msg00800.html

Oleksandr Andrushchenko (4):
  Add .clang-format files to enable manual coding style checks
  [EXAMPLE] Provide an example of a malformed patch
  [EXAMPLE] Changes done by clang-format to the previous commit
  [EXAMPLE] Whole file code style formatting

 .clang-format              |    5 +
 tools/xl/xl_info.c         |    6 +-
 xen/.clang-format          | 1380 ++++++++++++++++++++++++++++++++++++
 xen/drivers/char/ns16550.c |   13 +-
 xen/drivers/pci/pci.c      |    8 +-
 5 files changed, 1397 insertions(+), 15 deletions(-)
 create mode 100644 .clang-format
 create mode 100644 xen/.clang-format

-- 
2.25.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-03-04 20:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-01 11:42 [PATCH 0/4] clang-format with examples Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 1/4] Add .clang-format files to enable manual coding style checks Oleksandr Andrushchenko
2025-03-03 15:05   ` Roger Pau Monné
2025-03-03 19:23     ` Oleksandr Andrushchenko
2025-03-04  8:17       ` Roger Pau Monné
2025-03-04 20:04         ` Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 2/4] [EXAMPLE] Provide an example of a malformed patch Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 3/4] [EXAMPLE] Changes done by clang-format to the previous commit Oleksandr Andrushchenko
2025-03-01 11:42 ` [PATCH 4/4] [EXAMPLE] Whole file code style formatting Oleksandr Andrushchenko
2025-03-04 19:09 ` [PATCH 0/4] clang-format with examples Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.