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

Ensure contributed problem patterns are found correctly #12805

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

martin-fleck-at
Copy link
Contributor

What it does

  • Resolve pattern names correctly by removing leading '$'
  • Introduce utility function for dealing with variable names
  • Ensure 'ready' promises are already available with object creation

Fixes #12725

How to test

{
   "version": "2.0.0",
   "tasks": [
      {
         "label": "echo",
         "type": "shell",
         "command": "echo somefile.abc:1:4: warning: the roof is on fire ",
         "problemMatcher" : ["$myproblemmatcher"]
      }
   ]
}
  • Run Task 'echo' and check the Problems view:
    image

Review checklist

Reminder for reviewers

- Resolve pattern names correctly by removing leading '$'
- Introduce utility function for dealing with variable names
- Ensure 'ready' promises are already available with object creation

Fixes #12725
@vince-fugnitto vince-fugnitto added the tasks issues related to the task system label Aug 17, 2023
Copy link
Contributor

@jfaltermeier jfaltermeier left a comment

Choose a reason for hiding this comment

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

Thank you, looks good to me and works as expected.
I think we should add some docs to asVariableName and fromVariableName though, so that users know what happens when they pass variables/non-variables to each of the methods.

// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add some tsdocs to these new util methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I pushed an update with some comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

contributes.problemPatterns is not working
3 participants