Skip to content

Allow certain non-negated boolean expressions #675

@Luro02

Description

@Luro02

Summary

For example, this should be okay: !(a && b). Maybe count how many negations it did? If it is more than one, it should be simpler, e.g. !!(a && b)
I would say, !(a || b) is okay as well, but these should still be linted:

  • !(a == b)
  • !(!a)
  • !(!a && !b) -> a || b

TODO: How about <, >, <=, and >=?

Lint Name

No response

Reproducer

<code>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfalse-positiveA lint triggers on something that is correct.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions