[CI/Build] Add error matching config for mypy (#9512)
This commit is contained in:
parent
051eaf6db3
commit
67a7e5ef38
16
.github/workflows/matchers/mypy.json
vendored
Normal file
16
.github/workflows/matchers/mypy.json
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "mypy",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+):(\\d+):\\s(error|warning):\\s(.+)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"severity": 3,
|
||||
"message": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
3
.github/workflows/mypy.yaml
vendored
3
.github/workflows/mypy.yaml
vendored
@ -32,4 +32,5 @@ jobs:
|
||||
pip install types-setuptools
|
||||
- name: Mypy
|
||||
run: |
|
||||
tools/mypy.sh
|
||||
echo "::add-matcher::.github/workflows/matchers/mypy.json"
|
||||
tools/mypy.sh 1
|
||||
|
||||
@ -2,6 +2,10 @@
|
||||
|
||||
CI=${1:-0}
|
||||
|
||||
if [ $CI -eq 1 ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
run_mypy() {
|
||||
echo "Running mypy on $1"
|
||||
if [ $CI -eq 1 ] && [ -z "$1" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user