Skip to main content

external_hooks_warning

Function external_hooks_warning 

Source
pub fn external_hooks_warning(
    snapshot: Option<&ConfigSnapshot>,
) -> Option<String>
Expand description

What: The warning line for configured external hooks, or nothing when the snapshot defines none. Why: The answer comes from the snapshot alone, so a repository without hooks pays no process start and no file system call.

In TS you’d write (pseudocode):

hooks.length === 0 ? undefined : renderConfigurationWarning(0, code, explain(hooks), names);