1
0
Fork 0
mirror of https://github.com/ludeeus/action-shellcheck.git synced 2024-08-16 10:09:53 +02:00

Adds problem-matcher (#20)

* Adds problem-matcher

* Fix issue

* match as group 1

* use message

* Limit output

* remove testfile
This commit is contained in:
Joakim Sørensen 2020-07-05 23:50:07 +02:00 committed by GitHub
parent 2f2aa0d97f
commit 637bb438ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

22
.github/problem-matcher.json vendored Normal file
View file

@ -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
}
]
}
]
}

View file

@ -1,5 +1,8 @@
#!/bin/bash
## Enable problem matcher
echo "::add-matcher::.github/problem-matcher.json"
cd "$GITHUB_WORKSPACE" || exit 1
declare statuscode

View file

@ -1,3 +1,5 @@
#!/bin/sh
echo $test
echo $test $test
echo $test2