Skip to main content

Module indent

Module indent 

Source
Expand description

Shared indentation detection utility (D042).

Analyzes source file content to determine the indentation style (tabs vs spaces, width) used. Falls back to language-specific defaults when the file has insufficient indented lines or mixed signals.

Enums§

IndentStyle
Detected indentation style.

Functions§

detect_indent
Detect the indentation style of a source file.
source_line_ending
The line terminator generated text should use to match source: CRLF when CRLF rows are at least as common as bare LF rows, LF otherwise. Code inserted into a CRLF file must not introduce mixed line endings.