Error codes › same-line

Error codes

same-line

hint Style: how the model reads (archec vet)

What it means#

Two items on one line (archec vet): one per line, ; only inside a one-line block.

Example#

One item per line. Use ; between items only inside a block written on one line:

bad:   kind ecu; layer physical          good:  kind ecu
       tags safety                              layer physical
                                                tags safety
fine:  widget title { type text; at [0, 0, 12, 1] }

How to fix it#

The message says what is wrong and where, and often what was meant (Did you mean …?). Change the model so that what this page describes no longer holds, then check again: archec check main.arche.

A hint: a suggestion; the model builds as it is.

A style finding: archec vet reports it, archec check does not; archec fmt --write writes the layout ones.

archec check --beginner says the most common messages in plain words, with the names that exist.

The automatic fix#

archec has no fix of its own for this code. When the message says Did you mean …?, VS Code offers that change (Quick Fix).

In the terminal#

archec explain same-line prints this explanation; archec explain style lists the codes of its area.