package crs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=dad0c46a83ef40da150d8b840b01c66af3b979dfa7c3e17c3edef38aa84b804f
sha512=d7a8b2a34f4a3ddda0eaaa3e4248ec2870f944a5d64782bd73b031637b01e94a378d7534b1c02da739f32343b342ed8e8bf491e6442a3bd7b0e748bd61c58770
doc/crs.cr-comment/Cr_comment/index.html
Module Cr_commentSource
A Cr_comment.t is an immutable value holding the information and metadata about a CR that was parsed from a file.
Getters
content is the text of the CR with comment markers removed from the beginning and end (if applicable). See also reindented_content.
This is the offset in the original file at which the content field started. This is useful if you need to reparse the content of CRs dynamically while being able to build locations.
This is the leading string that contains the comment markers on the left of the content field, stripped. This may be useful when linting comments and working on CR formatting.
whole_loc is suitable for removal of the entire CR comment. It includes the comments boundaries from path as well.
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.
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.
Show the CR with a line showing the file position.
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.
Sorts the supplied list of CRs and outputs it to the supplied out channel, separated by newline characters.
A convenient wrapper for output_list that prints to stdout.
Sort
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.
Deprecated
The following is deprecated and will be soon annotated as such with ocaml alerts. Please migrate, and do not use in new code.
This was renamed priority. Hint: Run ocamlmig migrate.