public enum ErrorFormat
extends Enum
How compilation errors and warnings are rendered (GROOVY-12312).
Each constant is a renderer which owns the layout of a whole report; the Message classes only say what went wrong and where, via Message.toDiagnostic. A format is selected with CompilerConfiguration.setErrorFormat and applied by ErrorCollector.write. Adding a layout means adding a constant here, not touching the messages.
| Enum constant | Description |
|---|---|
FULL |
The default, human-oriented rendering: each message as Message.write lays it out, typically with the offending source line and a caret marking the column, followed by a blank line; then a count per severity. |
SHORT |
One line per diagnostic, in the file:line:column: severity: message
form understood by most editors and CI log parsers; then a count per severity.
|
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
toString()The lower-case form used on the command line and in help text, e.g. |
|
public abstract void |
write(PrintWriter writer, Janitor janitor, List<? extends Message> warnings, List<? extends Message> errors, boolean debug)Renders a complete report: the warnings, then the errors. |
The default, human-oriented rendering: each message as Message.write lays it out, typically with the offending source line and a caret marking the column, followed by a blank line; then a count per severity.
One line per diagnostic, in the file:line:column: severity: message
form understood by most editors and CI log parsers; then a count per severity.
The source line and caret are omitted, and a message spanning several lines
is joined into one. Parts a message does not have are dropped rather than
guessed: no file when there is no source unit, no line and column when there
is no position.
The lower-case form used on the command line and in help text, e.g. short.
picocli matches an option value against this as well as name(), so
--error-format=short and --error-format=SHORT both parse.
Renders a complete report: the warnings, then the errors.
writer - the destinationjanitor - the cleanup helper for temporary source access, may be nullwarnings - the warnings, may be null or emptyerrors - the errors, may be null or emptydebug - whether to follow each syntax error with its stack traceCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.