Skip to content

Add Problem matcher docs #56

Closed

Description

@damccorm

Would be helpful to have a schema/explanation of what matchers actually do.

Activity

  1. self-assigned this
    on Aug 14, 2019
  2. xt0rted commented on Aug 22, 2019

    @xt0rted
    Contributor

    I added one of these to my action and it was working ok, but when I switched it over to run in a Docker container the run started to fail saying the file couldn't be found (I've confirmed it is in the container). Do these not work in Docker containers or is there more to get them working?

    I used this as my format guide since they seemed to be the same, or close enough that things still worked https://code.visualstudio.com/Docs/editor/tasks#_defining-a-problem-matcher

  3. damccorm commented on Aug 22, 2019

    @damccorm
    ContributorAuthor

    @ericsciple is there any reason problem matchers wouldn't work in a docker container? I'm not aware of any, but he would know better

  4. xt0rted commented on Aug 23, 2019

    @xt0rted
    Contributor

    @damccorm I got it working. I switched from ## to :: as per #59 and that fixed it. Both syntaxes worked in script style actions, but container based ones seem to only support ::.


    I take that back. The :: syntax doesn't get picked up for problem matchers which is why it wasn't failing. I also realized that I can use core.error() and get the same results so that's what I'm going with now.

  5. thboop commented on Sep 26, 2019

    @thboop
    Collaborator

    We should cover that these will create annotations, and how else users can create annotations using issues on the toolkit docs!

  6. xt0rted commented on Sep 26, 2019

    @xt0rted
    Contributor

    @thboop as per my comments above I was unable to use problem matchers in a docker based action. Should that be possible or can you only use problem matchers in javascript based actions?

  7. thboop commented on Sep 26, 2019

    @thboop
    Collaborator

    @xt0rted, problem matchers should work in actions running in docker. I'll take a look shortly and create a ticket if I'm able to reproduce the issue. Otherwise, do you have an example you can link?

  8. xt0rted commented on Sep 26, 2019

    @xt0rted
    Contributor

    @thboop after I couldn't get it to work I switched to using log commands since it achieved the same thing.

  9. thboop commented on Sep 30, 2019

    @thboop
    Collaborator

    @thboop after I couldn't get it to work I switched to using log commands since it achieved the same thing.
    @xt0rted sorry for the delay!
    We did recently fix a bug where the workspace of actions running in a container was getting set incorrectly (which may have prevented you from registering a problem matcher as it would not be able to locate the file correctly). That being said, Problem Matchers appear to be working fine in containers for me! Please file an issue if you run into the problem again!

  10. assigned and unassigned on Oct 1, 2019
  11. TrueBrain commented on Oct 29, 2019

    @TrueBrain

    The problem I am having with using Docker for this, that I first need to copy the ProblemMatcher file to the host system:

    https://github.com/TrueBrain/actions-flake8/blob/initial_work/entrypoint.sh#L5

    I am not sure if this is intended, but every other way resulted in errors. It seems add-matcher uses the host filesystem (which makes sense). But your comments here suggests it should work from within a Docker. Do you have an example how you tested that it worked (so I can cheat from it :D)? Or is my solution the way to go?

  12. softprops commented on Dec 25, 2019

    @softprops

    @TrueBrain I hit the same issue. Your workaround for docker based images worked for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions