diff mbox series

[kvm-unit-tests,v1,10/10] add make format

Message ID 20231106125352.859992-11-nrb@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series RFC: Add clang-format and kerneldoc check | expand

Commit Message

Nico Boehr Nov. 6, 2023, 12:51 p.m. UTC
Add target "format" to the makefile to format all source files with
clang-format.

This currently assumes all architectures want to opt-in to formatting
with clang-format. Maybe they don't want that, then we can move the
target to architecture-specific folders.

Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 602910dda11b..b5509c74ad5b 100644
--- a/Makefile
+++ b/Makefile
@@ -147,3 +147,6 @@  tags:
 
 check-kerneldoc:
 	find . -name '*.[ch]' -exec scripts/kernel-doc -none {} +
+
+format:
+	find . -name '*.[ch]' ! -type l -exec clang-format -i {} +