Why is this an issue?

Identifies a logical not operator used without parentheses around the operand, followed by a comparison operator. This can indicate a mistake in the intended order of operations.

How to fix it

Code examples

Noncompliant code example

module m;
  int a, b, c, d;
  initial begin
    if (!a < b) begin end // Noncompliant
    if (!c < d) begin end // Noncompliant
  end
endmodule

Compliant solution

module m;
  int a, b, c, d;
  initial begin
    if (!(a < b)) begin end // Compliant: Parentheses after the '!' to evaluate the comparison first
    if ((!c) < d)) begin end // Compliant: Parentheses around left hand side expression to silence this issue
  end
endmodule