Skip to content

Add mypy problem matcher - #584

Open
studyingegret wants to merge 2 commits into
microsoft:mainfrom
studyingegret:mypy-problem-matcher
Open

Add mypy problem matcher#584
studyingegret wants to merge 2 commits into
microsoft:mainfrom
studyingegret:mypy-problem-matcher

Conversation

@studyingegret

Copy link
Copy Markdown

Supports combinations of --show-column-numbers, --hide-error-codes, --show-error-end.

The (?:\w:[\\/\\\\])? is to deal with the colon in C:\... paths.

Sample test output:

aaa.py:2:5:2:7: error: Name "aaa" is not defined  [name-defined]
D:\aaa\t\bbb.py:2:5:2:7: error: Name "aaa" is not defined  [name-defined]
D:\aaa\t\ccc.py:2:5: error: Name "aaa" is not defined  [name-defined]
ccc.py:2: error: Name "aaa" is not defined  [name-defined]
Found 1 error in 1 file (checked 1 source file)

regex101 test

Supports combinations of `--show-column-numbers`, `--hide-error-codes`, `--show-error-end`.

The `(?:\w:[\\/\\\\])?` is to deal with the colon in `C:\...` paths.

Sample test output:

```plain
aaa.py:2:5:2:7: error: Name "aaa" is not defined  [name-defined]
D:\aaa\t\bbb.py:2:5:2:7: error: Name "aaa" is not defined  [name-defined]
D:\aaa\t\ccc.py:2:5: error: Name "aaa" is not defined  [name-defined]
ccc.py:2: error: Name "aaa" is not defined  [name-defined]
Found 1 error in 1 file (checked 1 source file)
```

[regex101 test](https://regex101.com/?regex=%5E%28%28%3F%3A%5Cw%3A%5B%5C%2F%5C%5C%5D%29%3F%5B%5E%3A%5D%2B%29%3A%28%5Cd%2B%29%3A%28%3F%3A%28%5Cd%2B%29%3A%28%3F%3A%28%5Cd%2B%29%3A%28%5Cd%2B%29%3A%29%3F%29%3F+%28%5Cw%2B%29%3A+%28.%2B%3F%29%28%3F%3A%5Cs*%5C%5B%28%5B%5Cw-%5D%2B%29%5C%5D%29%3F%5Cs*%24&testString=aaa.py%3A2%3A5%3A2%3A7%3A+error%3A+Name+%22aaa%22+is+not+defined++%5Bname-defined%5D+%0AD%3A%5Caaa%5Ct%5Cbbb.py%3A2%3A5%3A2%3A7%3A+error%3A+Name+%22aaa%22+is+not+defined++%5Bname-defined%5D+%0AD%3A%5Caaa%5Ct%5Cccc.py%3A2%3A5%3A+error%3A+Name+%22aaa%22+is+not+defined++%5Bname-defined%5D+%0Accc.py%3A2%3A+error%3A+Name+%22aaa%22+is+not+defined++%5Bname-defined%5D+%0AFound+1+error+in+1+file+%28checked+1+source+file%29&flags=gm&flavor=pcre2&delimiter=%2F)
@rchiodo

rchiodo commented Jul 21, 2026

Copy link
Copy Markdown

🔒 Automated review in progress — @rchiodo is auto-reviewing this PR.

Comment thread package.json Outdated
Comment thread package.json

@rchiodo rchiodo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@heejaechang heejaechang left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants