cucumber / cucumber/vscode

`glue` and `features` globbing respects `files.exclude` but not `search.exclude`

Open
#250 1 comment 1 reaction 0 assignees View on GitHub
:bug: bug
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 👓 What did you see?

In our monorepo, we have `node_modules` included in `search.exclude` but not `files.exclude` so that node_modules shows up in the file tree in the editor.

However, this causes the `rg` processes that the extension spawns to take foreeevver because they don't include `-g !**/node_modules` which means that `rg` is scanning the entire (gigabytes) node_modules folder.

Adding `**/node_modules` to `files.exclude` solves the performance problem we're running into.

### ✅ What did you expect to see?

I'd expect one of:

1. Globbing respects `search.exclude`
2. Have the ability to add ignore paths to the globbing to speed it up
3. Automatically ignore `**/node_modules`?

### 📦 Which tool/library version are you using?

Cucumber for Visual Studio Code v1.10.0

### 🔬 How could we reproduce it?

Not really reproducible without a massive `node_modules` that takes upwards of 10 seconds to scan using `rg`. But you can note the arguments that are used in the `rg` process match `files.exclude` but not `search.exclude`.

### 📚 Any additional context?

I tried adding `!**/node_modules` to `cucumber.features` and `cucumber.glue` but unfortunately this gets translated to `-g /!**/node_modules` which doesn't successfully negate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.