Skip to content

Commit ea7af2e

Browse files
committed
Highlight error messages in CI
Copied problem-matchers from github/semmle-code, which is used for running CI for github/codeql.
1 parent fecf265 commit ea7af2e

File tree

5 files changed

+70
-0
lines changed

5 files changed

+70
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-query-format",
5+
"pattern": [
6+
{
7+
"regexp": "^((.*) would change by autoformatting\\.)$",
8+
"file": 2,
9+
"message": 1
10+
}
11+
]
12+
}
13+
]
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-syntax-check",
5+
"pattern": [
6+
{
7+
"regexp": "^((ERROR|WARNING): .* \\((.*):(\\d+),(\\d+)-\\d+\\))$",
8+
"message": 1,
9+
"file": 3,
10+
"line": 4,
11+
"col": 5,
12+
"severity": 2
13+
}
14+
]
15+
}
16+
]
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "codeql-test-run",
5+
"pattern": [
6+
{
7+
"regexp": "(\\[.*\\] FAILED\\((RESULT|COMPILATION)\\) (.*))$",
8+
"file": 3,
9+
"message": 1
10+
}
11+
]
12+
}
13+
]
14+
}

.github/problem-matchers/make.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "make",
5+
"pattern": [
6+
{
7+
"regexp": "^(make: \\*\\*\\* .*)$",
8+
"message": 1
9+
}
10+
]
11+
}
12+
]
13+
}

.github/workflows/codeqltest.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
- name: Check out code
3131
uses: actions/checkout@v2
3232

33+
- name: Enable problem matchers in repository
34+
shell: bash
35+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
36+
3337
- name: Build
3438
run: env PATH=$PATH:$HOME/codeql make
3539

@@ -75,6 +79,10 @@ jobs:
7579
- name: Check out code
7680
uses: actions/checkout@v2
7781

82+
- name: Enable problem matchers in repository
83+
shell: bash
84+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
85+
7886
- name: Build
7987
run: env PATH=$PATH:$HOME/codeql make
8088

@@ -108,6 +116,10 @@ jobs:
108116
- name: Check out code
109117
uses: actions/checkout@v2
110118

119+
- name: Enable problem matchers in repository
120+
shell: bash
121+
run: 'find .github/problem-matchers -name \*.json -exec echo "::add-matcher::{}" \;'
122+
111123
- name: Build
112124
run: |
113125
$Env:Path += ";$HOME\codeql"

0 commit comments

Comments
 (0)