use-git-ignore 0.0.1

Primitive gitignore pattern vocabulary for RustUse
Documentation
  • Coverage
  • 100%
    26 out of 26 items documented1 out of 18 items with examples
  • Size
  • Source code size: 10.09 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 663.6 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
  • Homepage
  • RustUse/use-git
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-git-ignore

Primitive gitignore pattern vocabulary for RustUse.

use-git-ignore classifies gitignore-style lines as blank lines, comments, negated patterns, directory patterns, or ordinary patterns. It does not decide whether a filesystem path is ignored.

Basic usage

use use_git_ignore::{GitIgnoreNegation, GitIgnoreRule};

let rule = GitIgnoreRule::parse("!target/").expect("valid ignore rule");

assert_eq!(rule.negation(), GitIgnoreNegation::Negated);
assert!(rule.is_directory_only());

Scope

  • Classify pattern text, comments, blank lines, negation, and directory markers.
  • Keep filesystem walking and ignore matching out of scope.