Version: 4.4.2 (Homebrew) · macOS
Summary
A CLI --exclude overrides .codemap/config.json's exclude array rather than adding to it. Passing a pattern that matches nothing therefore increases the file count, because the project's own exclusions stop applying.
Repro
In a repo whose .codemap/config.json has a non-empty exclude list (mine excluded a vendor directory and a submodule path):
codemap . # Files: 143
codemap --exclude ZZZNOMATCH . # Files: 159
Expected
--exclude ZZZNOMATCH matches no path, so the count should stay 143. Excluding more should never yield more.
Actual
159 — the 16 files the project config was excluding reappear.
Impact
Quiet rather than dramatic, but it means --exclude cannot be used to narrow a scan on any repo that has a config file: every use silently widens the scan first. It also makes --exclude results non-comparable to bare codemap . output, which is exactly when you'd reach for it.
Suggested fix
Union the two lists. If replacing is ever wanted, make it explicit — --exclude-only, or a documented note in --help that the flag overrides project config.
Version: 4.4.2 (Homebrew) · macOS
Summary
A CLI
--excludeoverrides.codemap/config.json'sexcludearray rather than adding to it. Passing a pattern that matches nothing therefore increases the file count, because the project's own exclusions stop applying.Repro
In a repo whose
.codemap/config.jsonhas a non-emptyexcludelist (mine excluded a vendor directory and a submodule path):Expected
--exclude ZZZNOMATCHmatches no path, so the count should stay 143. Excluding more should never yield more.Actual
159 — the 16 files the project config was excluding reappear.
Impact
Quiet rather than dramatic, but it means
--excludecannot be used to narrow a scan on any repo that has a config file: every use silently widens the scan first. It also makes--excluderesults non-comparable to barecodemap .output, which is exactly when you'd reach for it.Suggested fix
Union the two lists. If replacing is ever wanted, make it explicit —
--exclude-only, or a documented note in--helpthat the flag overrides project config.