The 'true' and 'false' constants should only ever be used with the 'bool' type, never 'int'.
Signed-off-by: Daniel P. Berrangé <[email protected]> --- tests/style.mak | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/style.mak b/tests/style.mak index 32c7e706ba..ae658395c9 100644 --- a/tests/style.mak +++ b/tests/style.mak @@ -22,3 +22,9 @@ include tests/style-infra.mak include tests/style-excludes.mak + +# Use 'bool', not 'int', when assigning true or false +sc_int_assign_bool: + @prohibit='\<int\>.*= *(true|false)\b' \ + halt='use bool type for boolean values' \ + $(_sc_search_regexp) -- 2.36.1
