Credence.Semantic.OutdentedHeredoc (credence v0.4.5)

Copy Markdown

Fixes compiler warnings about outdented heredoc lines by re-indenting all body content to match the closing delimiter.

LLMs often generate heredoc documentation where the body content is not indented to match the closing """, causing a compiler warning that becomes a hard error under --warnings-as-errors.

When any line in a heredoc is flagged, the fixer re-indents every outdented body line in that heredoc — not just the flagged one.

Example

# Warning: outdented heredoc line
@doc """

Content not indented enough. More content.

"""

# Fixed:
@doc """
Content not indented enough.
More content.
"""