The negated pattern should not be repeated multiple times
if (x is not null and not 0 and not 1)
if (x is not (null or 0 or 1))
dotnet_diagnostic.AL0002.severity = warning
Was this page helpful?