Skip to content

Commit

Permalink
Adds problem-matcher (#20)
Browse files Browse the repository at this point in the history
* Adds problem-matcher

* Fix issue

* match as group 1

* use message

* Limit output

* remove testfile
  • Loading branch information
ludeeus authored Jul 5, 2020
1 parent 2f2aa0d commit 637bb43
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"problemMatcher": [
{
"owner": "shellcheck",
"pattern": [
{
"regexp": "^In\\s(.+)\\sline\\s(\\d+):$",
"file": 1,
"line": 2
},
{
"regexp": ".*"
},
{
"regexp": "(SC\\d+):\\s(.+)$",
"code": 1,
"message": 2
}
]
}
]
}
3 changes: 3 additions & 0 deletions runaction
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

## Enable problem matcher
echo "::add-matcher::.github/problem-matcher.json"

cd "$GITHUB_WORKSPACE" || exit 1

declare statuscode
Expand Down
4 changes: 3 additions & 1 deletion testfiles/ignore/ignore.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh

echo $test
echo $test $test

echo $test2

0 comments on commit 637bb43

Please sign in to comment.