tsv_ignore 0.8.0

gitignore-faithful hierarchical ignore matching (.gitignore, .formatignore, .prettierignore) behind tsv's file discovery
Documentation
  • Coverage
  • 100%
    26 out of 26 items documented2 out of 18 items with examples
  • Size
  • Source code size: 147.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 529.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • fuzdev/tsv
    28 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ryanatkn

tsv_ignore

gitignore-faithful hierarchical ignore matching (.gitignore, .formatignore, .prettierignore) behind tsv format's file discovery — part of tsv.

The matcher is pure: locating the ignore files, reading them and walking directories are the caller's jobs. Its contract is git check-ignore --no-index (no index: a tracked file a rule matches is ignored), less the differences its docs list.

use tsv_ignore::{IgnoreStack, PathKind};

let mut stack = IgnoreStack::new();
stack.push_gitignore("", "build/\n*.log\n"); // the root .gitignore
stack.push_formatignore("", "!keep.log\n"); // read after every .gitignore
assert!(stack.is_ignored("build/out.js", PathKind::File));
assert!(!stack.is_ignored("keep.log", PathKind::File));

API docs: docs.rs/tsv_ignore.

Minimum supported Rust version: 1.94; raising it ships in a minor release. Release notes: CHANGELOG.md.

License: 0BSD