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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

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 {} +
-- 
2.41.0





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux