View Source Credo.CLI.Output (Credo v1.6.4)

This module provides helper functions regarding command line output.

Link to this section Summary

Link to this section Functions

Link to this function

check_tag(category, in_parens \\ true)

View Source
Link to this function

complain_about_invalid_source_files(invalid_source_files)

View Source
Link to this function

complain_about_timed_out_source_files(large_source_files)

View Source
Link to this function

foreground_color(background_color)

View Source

Returns a suitable foreground color for a given background_color.

iex> Credo.CLI.Output.foreground_color(:yellow)
:black

iex> Credo.CLI.Output.foreground_color(:blue)
:white
Link to this function

issue_color(issue_or_priority)

View Source

Returns a suitable color for a given priority.

iex> Credo.CLI.Output.issue_color(%Credo.Issue{priority: :higher})
:red

iex> Credo.CLI.Output.issue_color(%Credo.Issue{priority: 20})
:red
Link to this function

priority_arrow(issue_or_priority)

View Source

Returns a suitable arrow for a given priority.

iex> Credo.CLI.Output.priority_arrow(:high)
"↗"

iex> Credo.CLI.Output.priority_arrow(10)
"↗"

iex> Credo.CLI.Output.priority_arrow(%Credo.Issue{priority: 10})
"↗"
Link to this function

priority_name(issue_or_priority)

View Source

Returns a suitable name for a given priority.

iex> Credo.CLI.Output.priority_name(:normal)
"normal"

iex> Credo.CLI.Output.priority_name(1)
"normal"

iex> Credo.CLI.Output.priority_name(%Credo.Issue{priority: 1})
"normal"
Link to this function

term_columns(default \\ 80)

View Source