Documentation
¶
Index ¶
Constants ¶
const NoFormatMarker = "__SPEAKEASY_NO_FORMAT__"
NoFormatMarker is the sentinel emitted by the `skipFormat` template function to signal that the rendered file must skip the formatting pipeline. It must appear as the very first bytes of the rendered file. The marker (and its trailing newline, if present) is stripped before the file is written to disk.
Variables ¶
This section is empty.
Functions ¶
func Prewarm ¶ added in v2.948.10
func Prewarm()
Prewarm starts compiling the WASM formatters (dprint, clang-format and rubyfmt) in the background so they are ready by the time generation formats its first file. Formatting calls the ensure functions itself, so Prewarm is only a latency optimisation. It is deliberately not run from init: commands that never format, such as lint and validate, should not pay for compiling the formatters.
func SetFormattingEnabled ¶
SetFormattingEnabled enables or disables formatting for a specific target. Used to gate formatting behind a gen.yaml config flag.
func ShouldSkipFormat ¶
Types ¶
This section is empty.