Credo v1.5.0-rc.2 Credo.Check.Warning.BoolOperationOnSameValues View Source

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

Explanation

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

Examples:

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

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

Configuration parameters

There are no parameters for this check.

Link to this section Summary

Link to this section Functions

Link to this function

do_run_on_source_file(exec, source_file, params)

View Source