# Ignore invalid file patterns individually \(\#64525\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/887149bbdd90a2f376583f156e558f2f016dc2e8)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 887149bbdd90a2f376583f156e558f2f016dc2e8

Requested commit: 887149bbdd90a2f376583f156e558f2f016dc2e8

Commit: 887149bbdd90a2f376583f156e558f2f016dc2e8

Tree: c1c18f923f899b769208fb09ed22c48331cf3097

Author: Dom Porada

Committer: GitHub

## Message

```
Ignore invalid file patterns individually (#64525)

## Objective

Prevent one invalid file pattern from discarding valid patterns or
causing settings loading to panic.

The pre-existing exclusion-matcher bug was reported during review of
#64492 (part of #64399).

## Solution

Ignore invalid entries individually and log their errors in
`file_scan_exclusions`, `file_scan_inclusions`, `file_types`,
`hidden_files`, `private_files`, and `read_only_files`.

Preserve valid inherited entries without changing `"..."`, replacement,
or empty list behavior. Valid brace inclusion patterns remain usable,
including when an alternative spans multiple directories.

## Testing

Reproduced matcher loss and inclusion and file type panic paths before
fixing them. Targeted tests pass on macOS for mixed, inherited,
replacement, empty, and all-invalid lists, including inherited `.git`
exclusions, private file protections, and inclusion rescans with brace
patterns.

Windows and Linux execution remains untested.

## Self-Review Checklist:

- [x] I’ve reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed invalid file patterns discarding valid exclusions, hidden file
rules, or read-only rules, or causing inclusion settings to panic. Also
fixed invalid private file patterns discarding valid protections and
invalid file type patterns causing settings loading to panic.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
```

## Parents

- [0eda7703f6c88aa08a25c1d2105ff1ca46f775d4](https://git.cafe/gitcafe/zed/commit/0eda7703f6c88aa08a25c1d2105ff1ca46f775d4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/887149bbdd90a2f376583f156e558f2f016dc2e8?format=markdown)
