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§
- Indent
Style - 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.