Repository: tailwindlabs/tailwindcss
File: crates/oxide/src/scanner/allowed_paths.rs (Rust)

Code before:
            Some(file_type) if file_type.is_dir() => match entry.file_name().to_str() {
                Some(dir) => !IGNORED_CONTENT_DIRS.contains(&dir),
                None => false,
            },
            Some(file_type) if file_type.is_file() || file_type.is_symlink() => {
                is_allowed_content_path(entry.path())
            }
            _ => false,
        })
        .build()
        .filter_map(Result::ok)
}

fn create_walk_builder(root: &Path) -> WalkBuilder {
  let mut builder = WalkBuilder::new(root);

  // Scan hidden files / directories
  builder.hidden(false);

  // By default, allow .gitignore files to be used regardless of whether or not
  // a .git directory is present. This is an optimization for when projects
  // are first created and may not be in a git repo yet.
  builder.require_git(false);

  // Don't descend into .git directories inside the root folder
  // This is necessary when `root` contains the `.git` dir
  builder.filter_entry(|entry| entry.file_name() != ".git");

  // If we are in a git repo then require it to ensure that only rules within
  // the repo are used. For example, we don't want to consider a .gitnore file
  // in the user's home folder if we're in a git repo.
  //
  // The alternative is using a call like `.parents(false)` but that will
  // prevent looking at parent directories for .gitignore files from within
  // the repo and that's not what we want.
  //
  // For example, in a project with this structure:
  //
  // home
  // .gitignore
  //  my-project
  //   .gitignore
  //   apps
  //     .gitignore
  //     web
  //       {root}
  //
  // We do want to consider all .gitignore files listed:
  // - home/.gitignore
  // - my-project/.gitignore
  // - my-project/apps/.gitignore

Review comment (suggestion):
```suggestion
  // This is necessary when `root` contains the `.git` dir.
```

Code after:
                None => false,
            },
            Some(file_type) if file_type.is_file() || file_type.is_symlink() => {
                is_allowed_content_path(entry.path())
            }
            _ => false,
        })
        .build()
        .filter_map(Result::ok)
}

fn create_walk_builder(root: &Path) -> WalkBuilder {
    let mut builder = WalkBuilder::new(root);

    // Scan hidden files / directories
    builder.hidden(false);

    // By default, allow .gitignore files to be used regardless of whether or not
    // a .git directory is present. This is an optimization for when projects
    // are first created and may not be in a git repo yet.
    builder.require_git(false);

    // Don't descend into .git directories inside the root folder
    // This is necessary when `root` contains the `.git` dir.
    builder.filter_entry(|entry| entry.file_name() != ".git");

    // If we are in a git repo then require it to ensure that only rules within
    // the repo are used. For example, we don't want to consider a .gitignore file
    // in the user's home folder if we're in a git repo.
    //
    // The alternative is using a call like `.parents(false)` but that will
    // prevent looking at parent directories for .gitignore files from within
    // the repo and that's not what we want.
    //
    // For example, in a project with this structure:
    //
    // home
    // .gitignore
    //  my-project
    //   .gitignore
    //   apps
    //     .gitignore
    //     web
    //       {root}
    //
    // We do want to consider all .gitignore files listed:
    // - home/.gitignore
    // - my-project/.gitignore
    // - my-project/apps/.gitignore
    //
    // However, if a repo is initialized inside my-project then only the following