View Source Vnu.Message (Vnu v1.1.1)
A message is a unit of information returned by the Checker. See its documentation for detailed up to date information about its output format.
Fields
:type
- One of:error
,:info
, or:non_document_error
. Info messages can either be general information or warnings, see:sub_type
. Non-document errors signify errors with the Checker server itself, and are treated internally by this library as if the validation could not be run at all.:sub_type
- For messages of type:error
it could benil
or:fatal
. For messages of type:info
, it could benil
or:warning
.:message
- The detailed description of the issue.:extract
- The snippet of the document that the message is about.-
:first_line
,:last_line
,:first_column
,:last_column
- The position of the part of the document the message is about relative to the whole document. Lines and columns are numbered from 1. :hilite_start
,:hilite_length
- Indicate the start and length of substring of the:extract
that the message is roughly about. The characters are numbered from 0.
Summary
Types
@type t() :: %Vnu.Message{ extract: String.t() | nil, first_column: integer() | nil, first_line: integer() | nil, hilite_length: integer() | nil, hilite_start: integer() | nil, last_column: integer() | nil, last_line: integer() | nil, message: String.t() | nil, offset: integer() | nil, sub_type: :warning | :fatal | :io | :schema | :internal | nil, type: :error | :info | :non_document_error }