Skip to content

Commit 9715d21

Browse files
committed
Add Flake8 problem matcher
1 parent d6fd9f4 commit 9715d21

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

31+
- name: Register problems matchers
32+
run: |
33+
echo "::add-matcher::.github/workflows/matchers/flake8.json"
34+
echo "::add-matcher::.github/workflows/matchers/python.json"
35+
3136
- name: Install tox
3237
run: pip install tox
3338

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "flake8-error",
5+
"severity": "error",
6+
"pattern": [
7+
{
8+
"regexp": "^(.*):(\\d+):(\\d+):\\s([EF]\\d{3}\\s.*)$",
9+
"file": 1,
10+
"line": 2,
11+
"column": 3,
12+
"message": 4
13+
}
14+
]
15+
},
16+
{
17+
"owner": "flake8-warning",
18+
"severity": "warning",
19+
"pattern": [
20+
{
21+
"regexp": "^(.*):(\\d+):(\\d+):\\s([CDNW]\\d{3}\\s.*)$",
22+
"file": 1,
23+
"line": 2,
24+
"column": 3,
25+
"message": 4
26+
}
27+
]
28+
}
29+
]
30+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "python",
5+
"pattern": [
6+
{
7+
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
8+
"file": 1,
9+
"line": 2
10+
},
11+
{
12+
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
13+
"message": 2
14+
}
15+
]
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)