cucumber / cucumber/vscode

Default glue paths should support multi-root and nested workspaces

Open
#117 3 comments 1 reaction 0 assignees View on GitHub
:zap: enhancement
Dominant language
TypeScript
Stars
88
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### 👓 What did you see?

When I open a workspace that has `tests/features/*` structure somewhere in it, every step is marked as `Undefined`.

![image](https://user-images.githubusercontent.com/35764628/196755611-937ddc41-23ad-4d02-82da-fa14a3700a35.png)

### ✅ What did you expect to see?

Should the extension use the settings...
```json
{
"cucumber.glue": [
"src/test/**/*.java",
"features/**/*.ts",
"features/**/*.tsx",
"features/**/*.php",
"features/**/*.py",
"tests/**/*.py",
"tests/**/*.rs",
"features/**/*.rs",
"features/**/*.rb",
"*specs*/**/.cs"
]
}
```
...to find the specified structure across the opened workspace and associate `.feature` files with corresponding matchers? Users currently have to tune their local workspace settings:
```jsonc
// in a local .vscode/settings.json
{
"cucumber.glue": [
"path/to/dir/tests/**/*.ext"
]
}
```
... so that extension can find the matchers.

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

```
Name: Cucumber
Id: CucumberOpen.cucumber-official
Description: Cucumber for Visual Studio Code
Version: 1.5.1
Publisher: Cucumber
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=CucumberOpen.cucumber-official
```

### 🔬 How could we reproduce it?

Move the `tests/features/` dir (and possibly re-configure your build system for this change) in some nested dir, not in the top-level dir, observe the `Undefined step` and no `goto definition` in the editor for every step in the `.feature`s files. Default VScode settings.

MRE: https://github.com/zohnannor/cucumber-vscode-mre/tree/workspace

----

*This text was originally generated from a [template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates), then edited by hand. [You can modify the template here.](https://github.com/cucumber/.github/edit/main/.github/ISSUE_TEMPLATE/bug_report.md)*

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.