Skip to content

fix(ignore): BUILD files incorrectly ignored on case-insensitive file systems (macOS) #980

@yamadashy

Description

@yamadashy

Summary

On macOS (case-insensitive file system), pants build tool's BUILD files are incorrectly ignored because the default ignore pattern build/** matches them.

Problem

  • Repomix has build/** in defaultIgnore.ts:111
  • macOS uses a case-insensitive file system by default (HFS+/APFS)
  • The BUILD files (used by pants build tool) are matched by build/** pattern
  • Users cannot simply add !BUILD to include patterns because that would still be affected by the ignore

Expected Behavior

BUILD files should be included in repomix output, as they are source configuration files (not build output directories).

Current Workaround

Users need to disable default patterns entirely and manually specify all other patterns:

{
  "ignore": {
    "useDefaultPatterns": false,
    "customPatterns": [
      // manually add all patterns except build/**
    ]
  }
}

This is not ideal.

Potential Solutions

  1. Explicitly set caseSensitiveMatch: true in globby options at createBaseGlobbyOptions() in fileSearch.ts

  2. Change the pattern from build/** to something more specific that won't match BUILD files

  3. Add !BUILD and !**/BUILD to a "never ignore" list that takes precedence

Environment

  • OS: macOS (case-insensitive file system)
  • Build tool: pants (uses BUILD files)

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions