package crs

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

Module Crs_ignore.RulesSource

This module allows to implement some caching or any other useful utils when dealing with all the .crs-ignore files from the tree at once.

Sourcetype t
Sourceval create : File.t Base.list -> t

After having loaded all ".crs-ignore" files from the repo, you can build a t value from there aggregation. The expectation is that they should all come from the same repo_root or the behavior is unspecified.

Sourceval is_file_ignored : t -> path:Volgo.Vcs.Path_in_repo.t -> Base.bool

This will go from the deeper directory containing the path, and then walking up, until a pattern is found that instruct that this file would be ignored. If no pattern was encountered upon reaching the root of the repository, this returns false.

Sourceval unused_patterns : t -> Base.string Loc.Txt.t Base.list

After having performed is_file_ignored operations, it is possible to use this function to access all located patterns that haven't been used. This is used by a validation command, to trigger some warning inviting the user to clean their crs-ignore config files.