Skip to content

Commit 847ba8f

Browse files
Add Github Problem Matchers actions for GCC/MSVC
1 parent 87df80d commit 847ba8f

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.github/problem-matchers/gcc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "gcc-problem-matcher",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:(?:\\.\\.?)?\\/)?(?:icinga2\\/)?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"message": 5
13+
}
14+
]
15+
}
16+
]
17+
}

.github/problem-matchers/msvc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "msvc-problem-matcher",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\):\\s(error|warning|info)\\s(\\w{1,2}\\d+):\\s([^\\s].*?)\\s\\[(.*)\\]$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"code": 5,
13+
"message": 6,
14+
"fromPath": 7
15+
}
16+
]
17+
}
18+
]
19+
}

.github/workflows/linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
- name: Checkout HEAD
7171
uses: actions/checkout@v5
7272

73+
- name: Turn on Problem Matcher
74+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
75+
7376
- name: Restore/backup ccache
7477
uses: actions/cache@v4
7578
with:

.github/workflows/windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
Set-PSDebug -Trace 1
3939
& .\doc\win-dev.ps1
4040
41+
- name: Turn on Problem Matcher
42+
run: Write-Host "::add-matcher::.github/problem-matchers/msvc.json"
43+
4144
- name: Binary
4245
run: |
4346
Set-PSDebug -Trace 1

0 commit comments

Comments
 (0)