### Virtual Method

# Foundry DiagnosticProvider diagnose

#### Declaration [src]

    DexFuture*
    diagnose (
      FoundryDiagnosticProvider* self,
      GFile* file,
      GBytes* contents,
      const char* language
    )

#### Description [src]

Processes `file` to extract diagnostics.

#### Parameters

`file`

  Type: `GFile`

  The `GFile` of the underlying file, if any.

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

`contents`

  Type: `GBytes`

  The `GBytes` of file contents, or `NULL`.

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

`language`

  Type: `const char*`

  The language code such as “c”.

  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.