package dunolint-lib

  1. Overview
  2. Docs

Module Dunolint.ConfigSource

Sourcetype t
Sourceval equal : t -> t -> bool
Sourceval compare : t -> t -> int
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t

This is used by tests for quick debug. To print the config into a file, see to_file_contents.

Sourcemodule V0 : sig ... end
Sourcemodule V1 : sig ... end

Create

Sourceval v0 : V0.t -> t
Sourceval v1 : V1.t -> t

Save to file

Sourceval to_file_contents : t -> generated_by:string -> string

This is the recommended way to create the contents of the config to save to a file via a dune rule. generated_by should be the path to the file that implements the config, and will be mentioned in a header comment at the top with a sentence indicating that the config is generated and should not be edited.

To/from stanzas.

Sourceval of_stanzas : Sexplib0.Sexp.t list -> t
Sourceval to_stanzas : t -> Sexplib0.Sexp.t list

Private Utils

Sourcemodule Private : sig ... end

Compatibility

We plan on removing this compatibility layer and enforcing the use of the versioned API in the future. This will be done as a gradual and multi steps transition. At the moment we offer both APIs to start experimenting with the specification of configs using the versioned API.

Sourcemodule Skip_subtree : sig ... end
Sourcemodule Rule : sig ... end
Sourcemodule Std : sig ... end
Sourceval skip_subtree : t -> Skip_subtree.t option
Sourceval rules : t -> Rule.t list
Sourceval create : ?skip_subtree:Skip_subtree.t -> ?rules:Rule.t list -> unit -> t