Skip to content

Add problem-matchers for Pylint, MyPy, and Black #1580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 6, 2025

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Mar 4, 2025

GitHub Problem Matchers are a mechanism that enable workflow steps to scan the outputs of GitHub Actions for regex patterns and automatically write annotations in the workflow summary page. Using Problem Matchers allows information to be displayed more prominently in the GitHub user interface.

This add problem matchers for Pylint, Mypy and Black output.

mhucka added 5 commits March 4, 2025 14:34
GitHub [Problem
Matchers](https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md)
are a mechanism that enable workflow steps to scan the outputs of
GitHub Actions for regex patterns and automatically write annotations
in the workflow summary page. Using Problem Matchers allows
information to be displayed more prominently in the GitHub user
interface.

This adds a problem matcher for Pylint output.

In the near future, we will almost certainly add more problem
matchers, so this also starts a README file where we can acknowlege
where they come from as we add them.
@mhucka mhucka changed the title Add problem-matcher for pylint Add problem-matchers for Pylint, MyPy, and Black Mar 4, 2025
@mhucka mhucka marked this pull request as ready for review March 4, 2025 23:23
@mhucka mhucka requested a review from mpharrigan March 4, 2025 23:23
@@ -130,6 +134,8 @@ jobs:
python -m pip install --upgrade pip
pip install -r dev_tools/requirements/envs/dev.env.txt
pip install --no-deps -e .
- name: Set up problem matcher for Mypy output
run: echo '::add-matcher::.github/problem-matchers/mypy.json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

just echoing things triggers this?

Copy link
Contributor Author

@mhucka mhucka Mar 5, 2025

Choose a reason for hiding this comment

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

I know it looks bonkers, but believe it or not, that bit with the ::add-matcher:: is the special sauce that GitHub uses to detect what's happening. Why this syntax and not something more clear? ¯_(ツ)_/¯

@mpharrigan mpharrigan enabled auto-merge (squash) March 6, 2025 18:49
@mpharrigan mpharrigan merged commit df451b5 into quantumlib:main Mar 6, 2025
8 checks passed
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.

2 participants