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 Oxide Scanner 8 imports 47 functions

Entity Profile

Dependency Diagram

graph LR
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19["scanner.rs"]
  433675ca_8d0e_feff_42a5_b3f666878cca["pretty_assertions::assert_eq"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> 433675ca_8d0e_feff_42a5_b3f666878cca
  c19ca8ed_9ac9_d111_771a_c6fee00dc15c["std::path::"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> c19ca8ed_9ac9_d111_771a_c6fee00dc15c
  34254263_a5e0_5a5d_8ccc_817bc3537318["std::process::Command"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> 34254263_a5e0_5a5d_8ccc_817bc3537318
  8ab5160b_6970_fb2e_755c_7407211cc8d7["std::thread::sleep"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> 8ab5160b_6970_fb2e_755c_7407211cc8d7
  96ad0a3d_5842_a9fe_76f7_ff244caac991["std::time::Duration"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> 96ad0a3d_5842_a9fe_76f7_ff244caac991
  cf006a3e_51d2_5361_1dd4_6d904d0bfa75["std::"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> cf006a3e_51d2_5361_1dd4_6d904d0bfa75
  d3c15706_8523_1bd0_5f87_b7600b628a90["tailwindcss_oxide::*"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> d3c15706_8523_1bd0_5f87_b7600b628a90
  c8fb0798_4aec_2943_d60e_89601383787e["tempfile::tempdir"]
  6b48c515_a72f_7a7d_7ea7_b80f71a82b19 --> c8fb0798_4aec_2943_d60e_89601383787e
  style 6b48c515_a72f_7a7d_7ea7_b80f71a82b19 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 Oxide 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: Oxide, 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