Package: org.codehaus.groovy.control

## [Java] Enum ErrorFormat

- org.codehaus.groovy.control.ErrorFormat

-     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.

  Since:
    6.0.0

- - ### Enum Constants Summary

    Enum constants classes
    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.

  - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Enum` | `compareTo, compareTo, describeConstable, equals, getClass, getDeclaringClass, hashCode, name, notify, notifyAll, ordinal, toString, valueOf, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ErrorFormat 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.

    - #### ErrorFormat 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. 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.

  - ### Method Detail

    - #### public String toString()

      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.

    - #### 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.

      Parameters:
        `writer` - the destination
        `janitor` - the cleanup helper for temporary source access, may be `null`
        `warnings` - the warnings, may be `null` or empty
        `errors` - the errors, may be `null` or empty
        `debug` - whether to follow each syntax error with its stack trace