gitignore.rs — tailwindcss Source File
Architecture documentation for gitignore.rs, a rust file in the tailwindcss codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 714a3a15_03d5_1e35_b535_53da70bce8eb["gitignore.rs"] 9c36bab6_5718_da10_fc4d_44064df919d1["super::"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> 9c36bab6_5718_da10_fc4d_44064df919d1 148a0379_62c6_86e3_d9b3_de1fdebd7cfb["std::"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> 148a0379_62c6_86e3_d9b3_de1fdebd7cfb 9cbe6468_bd8d_8529_1ea5_0e68c0d2850e["crate::"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> 9cbe6468_bd8d_8529_1ea5_0e68c0d2850e b9401f24_6a5e_b99d_2949_4696e4b55c46["std::sync::OnceLock"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> b9401f24_6a5e_b99d_2949_4696e4b55c46 fb676405_5bc7_975e_e7ca_f9f7713edb3c["regex_automata::"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> fb676405_5bc7_975e_e7ca_f9f7713edb3c 2cad2c90_4399_255c_13ee_4577dbd9ac3a["std::path::Path"] 714a3a15_03d5_1e35_b535_53da70bce8eb --> 2cad2c90_4399_255c_13ee_4577dbd9ac3a style 714a3a15_03d5_1e35_b535_53da70bce8eb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/*!
The gitignore module provides a way to match globs from a gitignore file
against file paths.
Note that this module implements the specification as described in the
`gitignore` man page from scratch. That is, this module does *not* shell out to
the `git` command line tool.
*/
use std::{
fs::File,
io::{BufRead, BufReader, Read},
path::{Path, PathBuf},
sync::Arc,
};
use {
globset::{Candidate, GlobBuilder, GlobSet, GlobSetBuilder},
regex_automata::util::pool::Pool,
};
use crate::{
Error, Match, PartialErrorBuilder,
pathutil::{is_file_name, strip_prefix},
};
/// Glob represents a single glob in a gitignore file.
///
/// This is used to report information about the highest precedent glob that
/// matched in one or more gitignore files.
#[derive(Clone, Debug)]
pub struct Glob {
/// The file path that this glob was extracted from.
from: Option<PathBuf>,
/// The original glob string.
original: String,
/// The actual glob string used to convert to a regex.
actual: String,
/// Whether this is a whitelisted glob or not.
is_whitelist: bool,
/// Whether this glob should only match directories or not.
is_only_dir: bool,
}
impl Glob {
/// Returns the file path that defined this glob.
pub fn from(&self) -> Option<&Path> {
self.from.as_ref().map(|p| &**p)
}
/// The original glob as it was defined in a gitignore file.
pub fn original(&self) -> &str {
&self.original
}
/// The actual glob that was compiled to respect gitignore
/// semantics.
pub fn actual(&self) -> &str {
&self.actual
}
// ... (809 more lines)
Domain
Subdomains
Functions
- actual()
- add()
- add_line()
- add_str()
- allow_unclosed_class()
- build()
- build_global()
- bytes()
- case_insensitive()
- empty()
- excludes_file_default()
- expand_tilde()
- from()
- gi_from_str()
- gitconfig_excludes_path()
- gitconfig_home_contents()
- gitconfig_xdg_contents()
- global()
- has_doublestar_prefix()
- home_dir()
- is_empty()
- is_only_dir()
- is_whitelist()
- len()
- matched()
- matched_path_or_any_parents()
- matched_stripped()
- new()
- num_ignores()
- num_whitelists()
- only_on_files()
- original()
- parse_excludes_file()
- parse_excludes_file1()
- parse_excludes_file2()
- parse_excludes_file3()
- parse_excludes_file4()
- parse_excludes_file5()
- path()
- path_string()
- regression_106()
- strip()
Dependencies
- crate::
- regex_automata::
- std::
- std::path::Path
- std::sync::OnceLock
- super::
Source
Frequently Asked Questions
What does gitignore.rs do?
gitignore.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the OxideEngine domain, PreProcessors subdomain.
What functions are defined in gitignore.rs?
gitignore.rs defines 42 function(s): actual, add, add_line, add_str, allow_unclosed_class, build, build_global, bytes, case_insensitive, empty, and 32 more.
What does gitignore.rs depend on?
gitignore.rs imports 6 module(s): crate::, regex_automata::, std::, std::path::Path, std::sync::OnceLock, super::.
Where is gitignore.rs in the architecture?
gitignore.rs is located at crates/ignore/src/gitignore.rs (domain: OxideEngine, subdomain: PreProcessors, directory: crates/ignore/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free