### Method

# Foundry DiagnosticManager diagnose

#### Declaration [src]

    DexFuture*
    foundry_diagnostic_manager_diagnose (
      FoundryDiagnosticManager* self,
      GFile* file,
      GBytes* contents,
      const char* language
    )

#### Description [src]

Diagnoses `file` using the loaded diagnostic providers and produces a `DexFuture` that will resolve to a `GListModel` of `FoundryDiagnostic`.

The resulting `GListModel` may be awaited for population to complete using `foundry_list_model_await()`.

#### Parameters

`file`

  Type: `GFile`

  A `GFile`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`contents`

  Type: `GBytes`

  Optional `GBytes` for file contents.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`language`

  Type: `const char*`

  The language identifier for `file`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `DexFuture`

A `DexFuture` that resolves to a `GListModel` of `FoundryDiagnostic`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.