What version of Oxfmt are you using?
Latest npm release via:
pnpm dlx oxfmt@latest --version
What command did you run?
Minimal repro:
https://github.com/camc314/oxfmt-gitignore-subdir-repro
Repro 1:
pnpm dlx oxfmt@latest --check dist
Repro 2:
cd apps
pnpm dlx oxfmt@latest --check
What happened?
oxfmt formats/checks files inside directories ignored by a parent .gitignore.
Repro structure:
.
├── .git/
├── .gitignore # ignores dist/ and apps/dist/
├── dist/
│ └── unformatted.js
└── apps/
└── dist/
└── unformatted.js
.gitignore:
Actual output includes ignored files:
dist/unformatted.js
Format issues found in above 1 files.
For the package-subdirectory case:
cd apps
pnpm dlx oxfmt@latest --check
also checks:
What did you expect to happen?
oxfmt should skip files ignored by parent .gitignore files inside the same Git repo.
In the examples above:
dist/unformatted.js should be skipped because root .gitignore ignores dist/
apps/dist/unformatted.js should be skipped when running from apps/ because root .gitignore ignores apps/dist/
What version of Oxfmt are you using?
Latest npm release via:
What command did you run?
Minimal repro:
https://github.com/camc314/oxfmt-gitignore-subdir-repro
Repro 1:
Repro 2:
cd apps pnpm dlx oxfmt@latest --checkWhat happened?
oxfmtformats/checks files inside directories ignored by a parent.gitignore.Repro structure:
.gitignore:Actual output includes ignored files:
For the package-subdirectory case:
cd apps pnpm dlx oxfmt@latest --checkalso checks:
What did you expect to happen?
oxfmtshould skip files ignored by parent.gitignorefiles inside the same Git repo.In the examples above:
dist/unformatted.jsshould be skipped because root.gitignoreignoresdist/apps/dist/unformatted.jsshould be skipped when running fromapps/because root.gitignoreignoresapps/dist/