View Source Credo.Check.Warning.BoolOperationOnSameValues (Credo v1.7.7)


This check is enabled by default.

Learn how to disable it via .credo.exs.

This check has a base priority of high and works with any version of Elixir.


Boolean operations with identical values on the left and right side are most probably a logical fallacy or a copy-and-paste error.


x && x
x || x
x and x
x or x

Each of these cases behaves the same as if you were just writing x.

Check-Specific Parameters

There are no specific parameters for this check.

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.