A line is longer than the configured maximum

tx0/go:long-linestrictwarningstyle

What it finds

Long lines are cut off or wrapped in editors, terminals and side-by-side diffs, and the end of the line, where an argument or a condition may hide, is the part that gets missed. gofmt does not wrap lines, so they stay as written.

Characters are counted, with a tab as one. Lines of import declarations, lines whose last token is a string literal or a struct tag, which cannot be broken without changing the value, and lines with a URL are left alone. The maximum is the parameter max_length, 150 by default.

From the rule's source, long_line.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/go:long-line" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/go:long-line] reason="..."

tx0 explain tx0/go:long-line shows the same in the terminal. Found a false positive? Report it.