Skip to main content

Module format_hints

Module format_hints 

Source
Expand description

Format hints configuration for command-to-format detection.

Supports multiple configuration styles:

[format-hints]
# Simple form - default priority (500)
"*lint*" = "eslint"
"cargo*" = "cargo"

# Structured form - explicit priority inline
"*pytest*" = { format = "pytest", priority = 100 }

# Priority sections - all entries inherit the section's priority
[format-hints.1000]
"mycompany-*" = "gcc"

[format-hints.100]
"legacy-*" = "text"

Structs§

FormatHint
A single format hint rule.
FormatHints
Format hints configuration.

Constants§

DEFAULT_PRIORITY
Default priority for simple pattern = “format” entries.

Functions§

glob_to_like
Convert a glob pattern to SQL LIKE pattern.
pattern_matches
Simple glob pattern matching. * matches any characters (including none).