Credo.Check.Readability.ImplTrue (Credo v1.5.0-rc.4) View Source

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

Explanation

When implementing behaviour callbacks, @impl true indicates that a function implements a callback, but a better way is to note the actual behaviour being implemented, for example @impl MyBehaviour. This not only improves readability, but adds extra validation in cases where multiple behaviours are implemented in a single module.

Instead of:

@impl true
def my_funcion() do
  ...

use:

@impl MyBehaviour
def my_funcion() do
  ...

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