package crs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Cr_commentSource

Sourcemodule Status : sig ... end
Sourcemodule Filter : sig ... end

A type to select only a subset of CRs.

Sourcemodule Priority : sig ... end
Sourcemodule Qualifier : sig ... end
Sourcemodule Digest_hex : sig ... end
Sourcemodule Header : sig ... end
Sourcetype t

A Cr_comment.t is an immutable value holding the information and metadata about a CR that was parsed from a file.

include Ppx_compare_lib.Equal.S with type t := t
Sourceval equal : t -> t -> bool
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t

Getters

Sourceval content : t -> Base.string

content is the text of the CR with comment markers removed from the beginning and end (if applicable). See also reindented_content.

Sourceval whole_loc : t -> Loc.t

whole_loc is suitable for removal of the entire CR comment. It includes the comments boundaries from path as well.

Sourceval status : t -> Status.t
Sourceval priority : t -> Priority.t

priority t represents the expectation as to when work on the CR is meant to happen. It is based on the header's qualifier except that XCRs and invalid CRs are meant to be worked on Now.

Sourceval digest_ignoring_minor_text_changes : t -> Digest_hex.t

This digest is computed such that changes in positions in a file, or changes in whitespaces are ignored. It is used by downstream systems to detect that two CRs are equivalent, which in turn may affect when a CR is active.

Print

Sourceval to_string : t -> Base.string

Show the CR with a line showing the file position.

Sourceval reindented_content : ?new_line_prefix:Base.string -> t -> Base.string

reindented_content t returns the content of the CR with leading indentation removed or normalized. This is useful for displaying multiple CRs together in a unified format, such as in crs grep. new_line_prefix allows to control the indentation or margin used to produce the new output. It defaults to "". Trailing whitespace are removed from new_line_prefix as needed.

Sourceval output_list : t Base.list -> oc:Stdio.Out_channel.t -> Base.unit

Sorts the supplied list of CRs and outputs it to the supplied out channel, separated by newline characters.

Sourceval print_list : t Base.list -> Base.unit

A convenient wrapper for output_list that prints to stdout.

Sort

Sourcemodule For_sorted_output : sig ... end

Private

This module is exported to be used by libraries with strong ties to cr_comment. Its signature may change in breaking ways at any time without prior notice, and outside the guidelines set by semver.

In particular, the intention here is that CRs may only be created using dedicated helpers libraries that are defined in this project, parsing them from files in vcs trees.

Sourcemodule Private : sig ... end

Deprecated

The following is deprecated and will be soon annotated as such with ocaml alerts. Please migrate, and do not use in new code.

Sourceval work_on : t -> Priority.t

This was renamed priority. Hint: Run ocamlmig migrate.

Sourceval kind : t -> Status.t

This was renamed status. Hint: Run ocamlmig migrate.

OCaml

Innovation. Community. Security.