Diagnostics

class Diagnostics

Description

All model diagnostics.

Members defined in Diagnostics (12 members)

all

R

Iterate over all diagnostics.

errors

R

Iterate over all diagnostics with error severity.

hints

R

Iterate over all diagnostics with hint severity.

infos

R

Iterate over all diagnostics with information severity.

parser

R

Iterate over all parser diagnostics.

results

RW

Per-source diagnostics

sema

R

Iterate over all semantic stage diagnostics.

validation

R

Iterate over all validation stage diagnostics.

warnings

R

Iterate over all diagnostics with warning severity.

all_with_severity

Iterate over all diagnostics with the given severity.

contains_errors

Checks whether any of the diagnostics are errors.

format

Format diagnostics contained here to string.

Attributes

property all: Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics.

property errors: Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics with error severity.

property hints: Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics with hint severity.

property infos: Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics with information severity.

property parser: Generator[syside.SourceDiagnostic, None, None]

Iterate over all parser diagnostics.

results: list[syside.DiagnosticResults] = None

Per-source diagnostics

property sema: Generator[syside.SourceDiagnostic, None, None]

Iterate over all semantic stage diagnostics.

property validation: Generator[syside.SourceDiagnostic, None, None]

Iterate over all validation stage diagnostics.

property warnings: Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics with warning severity.

Methods

all_with_severity(severity: syside.DiagnosticSeverity, include_higher_severity: bool = False) → Generator[syside.SourceDiagnostic, None, None]

Iterate over all diagnostics with the given severity.

Parameters:
  • severity – The severity of diagnostics to iterate over.

  • include_higher_severity – Whether to include diagnostics that are of higher severity than the given one.

contains_errors(warnings_as_errors: bool = False) → bool

Checks whether any of the diagnostics are errors.

Parameters:

warnings_as_errors – Treat warnings as errors.

format(predicate: Callable[[syside.Url, syside.Diagnostic], bool] | None = None) → str

Format diagnostics contained here to string.

Optional predicate allows filtering diagnostics included in the output.