GitHub Actions: Add yamllint problem matcher (#37468)
* GitHub Actions: Add yamllint problem matcher
* Introduce YAML issue to test problem matcher
* Revert "Introduce YAML issue to test problem matcher"
This reverts commit fa88c9484e
.
This commit is contained in:
parent
6d6188e34d
commit
3eb6e75d3e
2 changed files with 25 additions and 0 deletions
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
|
@ -498,6 +498,9 @@ jobs:
|
|||
run: |
|
||||
echo "Failed to restore Python virtual environment from cache"
|
||||
exit 1
|
||||
- name: Register yamllint problem matcher
|
||||
run: |
|
||||
echo "::add-matcher::.github/workflows/matchers/yamllint.json"
|
||||
- name: Run yamllint
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
|
|
22
.github/workflows/matchers/yamllint.json
vendored
Normal file
22
.github/workflows/matchers/yamllint.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "yamllint",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.*\\.ya?ml)$",
|
||||
"file": 1
|
||||
},
|
||||
{
|
||||
"regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$",
|
||||
"line": 1,
|
||||
"column": 2,
|
||||
"severity": 3,
|
||||
"message": 4,
|
||||
"code": 5,
|
||||
"loop": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue