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:
parent
2f2aa0d97f
commit
637bb438ec
3 changed files with 28 additions and 1 deletions
22
.github/problem-matcher.json
vendored
Normal file
22
.github/problem-matcher.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
## Enable problem matcher
|
||||||
|
echo "::add-matcher::.github/problem-matcher.json"
|
||||||
|
|
||||||
cd "$GITHUB_WORKSPACE" || exit 1
|
cd "$GITHUB_WORKSPACE" || exit 1
|
||||||
|
|
||||||
declare statuscode
|
declare statuscode
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo $test
|
echo $test $test
|
||||||
|
|
||||||
|
echo $test2
|
Loading…
Reference in a new issue