Skip to content

Would typeshed want this ".vscode\tasks.json"? #15339

@hunterhogan

Description

@hunterhogan

I've been using this VS Code task for about six months, and as far as I can tell, it behaves the same as when I type the commands at the command prompt. Do y'all want to add it to the repo? I'd bet money that other people could improve it in ways I can't imagine.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Run Tests on Staged Files",
            "type": "shell",
            "command": "powershell",
            "args": [
                "-Command",
                "& { .venv/Scripts/activate.ps1; $paths = (git diff --cached --name-only --diff-filter=AM | ForEach-Object { ($_ -split '/')[0,1] -join '/' } | Sort-Object -Unique); foreach ($path in $paths) { python tests/runtests.py --run-stubtest $path } }"
            ],
            "group": "test",
            "isBackground": false,
            "problemMatcher": [],
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": true,
                "clear": false
            }
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions