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

WIP: Add problemMatching to task #989

Merged
merged 5 commits into from
Feb 13, 2022
Merged

Conversation

gowerc
Copy link
Contributor

@gowerc gowerc commented Feb 12, 2022

What problem did you solve?

Wanted to try and incorporate problemMatching into the default R: test task to make it easier to find test failures when testing a R package. The change so far seems to be working (see screenshot below).

That being said I'm not sure how to test this. I was thinking about setting up a dummy repo and running the task inside of it but I can't quite work out how to do that... I had tried

    test('workbench actions', async () => {
        const action = await vscode.commands.executeCommand('workbench.action.tasks.runTask', 'R: Test');
        .....
    });

But that doesn't seem to work. My next idea was to try and extract the regex patterns and see if they work aginst pre-defined error messages but I couldn't figure out the api for getting access to them. Any advice here would be appreciated !

image

@renkun-ken
Copy link
Member

renkun-ken commented Feb 13, 2022

I test the implementation and it works as expected. When some test cases fail, the errors with proper message and location will show up in the diagnostics. When the problem is fixed and run tests again, the errors will disappear.

As for the tests of these tasks, I suggest that we could discuss it in a separate issue (#990) about how we could add more useful tests of vscode-R extension in general.

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@renkun-ken renkun-ken merged commit 9b525aa into REditorSupport:master Feb 13, 2022
@gowerc gowerc deleted the tasks branch September 6, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants