[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 9/9] tests/style: check qemu/osdep.h is NOT included in all .h
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v3 9/9] tests/style: check qemu/osdep.h is NOT included in all .h/.c.inc files |
Date: |
Thu, 7 Jul 2022 17:37:20 +0100 |
Since the qemu/osdep.h file must be included as the very first header
in all C source files, there is no reason to include it in .h or .c.in
files.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/style.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/style.yml b/tests/style.yml
index 6d91ac6115..d2a0299a33 100644
--- a/tests/style.yml
+++ b/tests/style.yml
@@ -143,3 +143,8 @@ osdep_h_in_source:
- tests/uefi-test-tools/.*
- tests/unit/test-rcu-(simpleq|slist|tailq)\.c
- tools/ebpf/rss.bpf.c
+
+osdep_h_in_header:
+ files: \.(h|c\.inc)$
+ prohibit: '#include "qemu/osdep\.h"'
+ message: only C source files may include qemu/osdep.h
--
2.36.1
[PATCH v3 9/9] tests/style: check qemu/osdep.h is NOT included in all .h/.c.inc files,
Daniel P . Berrangé <=
[PATCH v3 6/9] misc: ensure qemu/osdep.h is included first in all .c files, Daniel P . Berrangé, 2022/07/07
[PATCH v3 3/9] tests/style: check for mixups of bool constants with int variables, Daniel P . Berrangé, 2022/07/07
[PATCH v3 5/9] tests/style: check for commonly doubled up words, Daniel P . Berrangé, 2022/07/07
[PATCH v3 8/9] misc: remove qemu/osdep.h from headers / included source files, Daniel P . Berrangé, 2022/07/07