Skip to content

document-start

GitHub ActionsYAMLstylefix: safedefault: offyaml/yamllint

Reports a first document that does not start with ---. A document that has directives (%YAML) already starts with ---.

The --- marker makes it clear where a document starts, and it is required to put a directive in front. Some projects require it so that every file looks the same and several documents can be concatenated.

Reported
# comment
a: 1
github-actions:
lint:
rules:
document-start: warn # off (default), warn, error
yaml:
lint:
rules:
document-start: warn # off (default), warn, error

Enabled by the presets: yaml/yamllint.

Suppress one line with sudsy-disable-next-line document-start in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
yamllint document-start full