The 'true' and 'false' constants should only ever be used with the
'bool' type, never 'int'.

Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
---
 tests/style.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/style.yml b/tests/style.yml
index b4e7c6111f..704227d8e9 100644
--- a/tests/style.yml
+++ b/tests/style.yml
@@ -86,3 +86,8 @@
 #        A match added to the front of the regex. Useful when
 #        'terms' is a list of strings and a common prefix is
 #        desired
+
+int_assign_bool:
+  files: \.c$
+  prohibit: \<int\>.*= *(true|false)\b
+  message: use bool type for boolean values
-- 
2.36.1


Reply via email to