Home / File/ scanner.rs — tailwindcss Source File

scanner.rs — tailwindcss Source File

Architecture documentation for scanner.rs, a rust file in the tailwindcss codebase. 8 imports, 0 dependents.

File rust OxideEngine Scanner 8 imports 47 functions

Entity Profile

Dependency Diagram

graph LR
  340ddba0_15e4_a309_9dea_cf6d6e73381d["scanner.rs"]
  e4088d34_b5b4_ec51_b975_557a1536ec76["pretty_assertions::assert_eq"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> e4088d34_b5b4_ec51_b975_557a1536ec76
  9aa9da3e_3665_ff27_83fa_c1285f8c5a05["std::path::"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> 9aa9da3e_3665_ff27_83fa_c1285f8c5a05
  76dc7686_9dd0_00d4_6906_94568c3839d6["std::process::Command"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> 76dc7686_9dd0_00d4_6906_94568c3839d6
  c10681f2_479f_792e_e5e7_e85f6d41caca["std::thread::sleep"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> c10681f2_479f_792e_e5e7_e85f6d41caca
  3c9be9ae_6c7d_ac56_3bab_86004806059d["std::time::Duration"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> 3c9be9ae_6c7d_ac56_3bab_86004806059d
  148a0379_62c6_86e3_d9b3_de1fdebd7cfb["std::"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> 148a0379_62c6_86e3_d9b3_de1fdebd7cfb
  d0f50ca8_e27d_fb3b_012a_35295dbf1820["tailwindcss_oxide::*"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> d0f50ca8_e27d_fb3b_012a_35295dbf1820
  f1bca424_c5f6_2d09_b590_d1407e7cbc6f["tempfile::tempdir"]
  340ddba0_15e4_a309_9dea_cf6d6e73381d --> f1bca424_c5f6_2d09_b590_d1407e7cbc6f
  style 340ddba0_15e4_a309_9dea_cf6d6e73381d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

#[cfg(test)]
mod scanner {
    use pretty_assertions::assert_eq;
    use std::path::{Path, PathBuf};
    use std::process::Command;
    use std::thread::sleep;
    use std::time::Duration;
    use std::{fs, path};

    use tailwindcss_oxide::*;
    use tempfile::tempdir;

    fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> std::io::Result<()> {
        #[cfg(not(windows))]
        let result = std::os::unix::fs::symlink(original, link);

        #[cfg(windows)]
        let result = std::os::windows::fs::symlink_dir(original, link);

        result
    }

    fn public_source_entry_from_pattern(dir: PathBuf, pattern: &str) -> PublicSourceEntry {
        let mut parts = pattern.split_whitespace();
        let _ = parts.next().unwrap_or_default();
        let not_or_pattern = parts.next().unwrap_or_default();
        if not_or_pattern == "not" {
            let pattern = parts.next().unwrap_or_default();
            return PublicSourceEntry {
                base: dir.to_string_lossy().into(),
                pattern: pattern[1..pattern.len() - 1].to_string(),
                negated: true,
            };
        }

        PublicSourceEntry {
            base: dir.to_string_lossy().into(),
            pattern: not_or_pattern[1..not_or_pattern.len() - 1].to_string(),
            negated: false,
        }
    }

    struct ScanResult {
        files: Vec<String>,
        globs: Vec<String>,
        normalized_sources: Vec<String>,
        candidates: Vec<String>,
    }

    fn create_files_in(dir: &path::Path, paths: &[(&str, &str)]) {
        // Create the necessary files
        for (path, contents) in paths {
            // Ensure we use the right path separator for the current platform
            let path = dir.join(path.replace('/', path::MAIN_SEPARATOR.to_string().as_str()));
            let parent = path.parent().unwrap();
            if !parent.exists() {
                fs::create_dir_all(parent).unwrap();
            }

            fs::write(path, contents).unwrap()
// ... (1739 more lines)

Domain

Subdomains

Functions

Dependencies

  • pretty_assertions::assert_eq
  • std::
  • std::path::
  • std::process::Command
  • std::thread::sleep
  • std::time::Duration
  • tailwindcss_oxide::*
  • tempfile::tempdir

Frequently Asked Questions

What does scanner.rs do?
scanner.rs is a source file in the tailwindcss codebase, written in rust. It belongs to the OxideEngine domain, Scanner subdomain.
What functions are defined in scanner.rs?
scanner.rs defines 47 function(s): create_files_in, it_includes_skipped_by_default_extensions_with_a_specific_source, it_respects_gitignore_in_workspace_root, it_respects_gitignore_in_workspace_root_for_manual_globs, it_should_be_possible_to_scan_in_the_parent_directory, it_should_find_new_extensions, it_should_ignore_and_expand_nested_ignored_folders, it_should_ignore_binary_files, it_should_ignore_known_extensions, it_should_ignore_known_files, and 37 more.
What does scanner.rs depend on?
scanner.rs imports 8 module(s): pretty_assertions::assert_eq, std::, std::path::, std::process::Command, std::thread::sleep, std::time::Duration, tailwindcss_oxide::*, tempfile::tempdir.
Where is scanner.rs in the architecture?
scanner.rs is located at crates/oxide/tests/scanner.rs (domain: OxideEngine, subdomain: Scanner, directory: crates/oxide/tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free