Skip to content

Commit 3ba25d6

Browse files
authored
[CI/Build] Add error matching config for mypy (vllm-project#9512)
1 parent c1461be commit 3ba25d6

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/matchers/mypy.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "mypy",
5+
"pattern": [
6+
{
7+
"regexp": "^(.+):(\\d+):\\s(error|warning):\\s(.+)$",
8+
"file": 1,
9+
"line": 2,
10+
"severity": 3,
11+
"message": 4
12+
}
13+
]
14+
}
15+
]
16+
}

.github/workflows/mypy.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ jobs:
3232
pip install types-setuptools
3333
- name: Mypy
3434
run: |
35-
tools/mypy.sh
35+
echo "::add-matcher::.github/workflows/matchers/mypy.json"
36+
tools/mypy.sh 1

tools/mypy.sh

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
CI=${1:-0}
44

5+
if [ $CI -eq 1 ]; then
6+
set -e
7+
fi
8+
59
run_mypy() {
610
echo "Running mypy on $1"
711
if [ $CI -eq 1 ] && [ -z "$1" ]; then

0 commit comments

Comments
 (0)