formulahendry / formulahendry/vscode-code-runner

[Feature request] Make a version of `executorMapByGlob` that matches files' full paths instead

Open
#1,113 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

Code Runner currently provides `executorMapByGlob`, which is a useful option that lets me define different run commands for files with the same extension like this:
```json
{
"code-runner.executorMapByGlob": {
"*_test.py": "some-run-test-command $fullFileName",
"*.py": "some-run-normal-code-command $fullFileName"
}
}
```

However, it would be even more helpful if Code Runner could also match the full path of a file (not just the base name) to a glob pattern. This can be done by either
- Making [the existing `executorMapByGlob` option](https://github.com/formulahendry/vscode-code-runner/blob/832a58f446f0e7ca552c16d4b97f722643d8351b/src/codeManager.ts#L256-L258) match the full path instead, or
- Making a separate new command to do that, for instance like this:
```json
{
"code-runner.executorMapByFullPathGlob": {
"**/tests/**/*.py": "some-run-test-command $fullFileName",
"**/source/macos/**/*.py": "some-macos-specific-command $fullFileName",
"**/source/**/*.py": "some-other-command $fullFileName"
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.