pub fn should_colorize(no_color_present: bool, stream_is_terminal: bool) -> boolExpand description
Decide whether diagnostic rendering should include ANSI color escapes.
This is the pure decision core (injectable for tests):
NO_COLOR(https://no-color.org): the presence of the environment variable — any value, including the empty string — disables color.- TTY: color is only used when the stream that carries diagnostics
is an interactive terminal. Piped/redirected output (CI logs, agents
parsing
bock checkoutput) must never contain escape sequences.