Skip to content

no-flow-sequences

GitHub ActionsYAMLstyleno fixdefault: off

Reports a flow sequence ([a, b]), on its opening bracket. With allow_empty, an empty one ([]) is not reported.

Block style is the main style of YAML: one item to a line, with diffs that show a single changed item. A flow sequence packs items on one line, so a change touches the whole line and long ones wrap badly.

To fix, write one - item per line.

With this configuration:

no-flow-sequences:
level: warn
options:
allow_empty: true
Reported
a: [1, 2]
b: []
c: [ # note
]
github-actions:
lint:
rules:
no-flow-sequences:
level: warn # off (default), warn, error
options:
allow_empty: false
yaml:
lint:
rules:
no-flow-sequences:
level: warn # off (default), warn, error
options:
allow_empty: false
Option Type Default Description
allow_empty bool false Do not report empty collections ({}, []).

Suppress one line with sudsy-disable-next-line no-flow-sequences 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 brackets.forbid full