Skip to content

Commit

Permalink
Add matchers for linting problems on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster authored and OmeGak committed Sep 19, 2023
1 parent 62af006 commit d5158b5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/matchers/ruff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "ruff",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): \\s(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}
14 changes: 14 additions & 0 deletions .github/matchers/unbehead.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "unbehead",
"pattern": [
{
"regexp": "^((?:Missing|Incorrect) header) in (.+)$",
"message": 1,
"file": 2
}
]
}
]
}
7 changes: 7 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- devel
- master

env:
NO_COLORS: true

jobs:
setup:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -47,4 +50,8 @@ jobs:
poetry install
- name: Run tests
run: |
echo "::add-matcher::.github/matchers/ruff.json"
echo "::add-matcher::.github/matchers/unbehead.json"
poetry run -- make lint
echo "::remove-matcher owner=unbehead::"
echo "::remove-matcher owner=ruff::"

0 comments on commit d5158b5

Please sign in to comment.