Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide problem matcher #2

Open
bryceschober opened this issue Mar 13, 2019 · 2 comments
Open

Provide problem matcher #2

bryceschober opened this issue Mar 13, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@bryceschober
Copy link

It sure would be nice if this extension provided a problem matcher. I've worked up one that kinda basically works, but it's pretty long to copy around to the multiple test-subset tasks that I have in my workspace. The best I've come up with looks like:

    {
      "label": "Run all shell tests",
      "type": "shell",
      "command": "./test/lib/bats/bin/bats test/",
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "dedicated",
        "showReuseMessage": false,
        "clear": true
      },
      "problemMatcher": {
        "fileLocation": ["relative", "${workspaceFolder}"],
        "pattern": [
          // Regex testing at regexr.com/498rl
          { // Get file & line from the 1st line, like:
            //    (in test file test/examples.bats, line 10)
              "regexp": "\\s*\\(?in test file ([^,]+), line (\\d+)\\)\\s*",
              "file": 1,
              "line": 2
          },
          { // Get message from the 2nd line, like:
            //      `[ "$result" -eq 3 ]' failed
            // TODO: Support capture of multi-line output from bats extensions when this issue is
            // resolved: https://github.com/Microsoft/vscode/issues/9635 
              "regexp": "^\\s*(.*)\\s*$",
              "message": 1,
          }
        ]
      }
    }
@jetmartin
Copy link
Collaborator

Hi,

Sorry for the delay.
Nice Idea, I’ll look at that as soon as I get some time available for that.

Best

J-Et.

@jetmartin jetmartin added the enhancement New feature or request label Apr 23, 2019
@jetmartin
Copy link
Collaborator

Hi,

I've started to look at your point but I'm definitely too busy to manage and test it properly right now.

If someone want to provide support on that he is welcome !

Best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants