Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c125e8c

Browse files
committed
Add github ci problem matcher for clippy
1 parent a02a219 commit c125e8c

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/rust.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "rustfmt",
5+
"severity": "warning",
6+
"pattern": [
7+
{
8+
"regexp": "^(Diff in (.+)) at line (\\d+):$",
9+
"message": 1,
10+
"file": 2,
11+
"line": 3
12+
}
13+
]
14+
},
15+
{
16+
"owner": "clippy",
17+
"pattern": [
18+
{
19+
"regexp": "^(?:\\x1b\\[[\\d;]+m)*(warning|warn|error)(?:\\x1b\\[[\\d;]+m)*(\\[(.*)\\])?(?:\\x1b\\[[\\d;]+m)*:(?:\\x1b\\[[\\d;]+m)* ([^\\x1b]*)(?:\\x1b\\[[\\d;]+m)*$",
20+
"severity": 1,
21+
"message": 4,
22+
"code": 3
23+
},
24+
{
25+
"regexp": "^(?:\\x1b\\[[\\d;]+m)*\\s*(?:\\x1b\\[[\\d;]+m)*\\s*--> (?:\\x1b\\[[\\d;]+m)*(.*):(\\d*):(\\d*)(?:\\x1b\\[[\\d;]+m)*$",
26+
"file": 1,
27+
"line": 2,
28+
"column": 3
29+
}
30+
]
31+
}
32+
]
33+
}

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
rustup component add --toolchain ${{ env.RUST_CHANNEL }} rustfmt rust-src
6767
rustup default ${{ env.RUST_CHANNEL }}
6868
69+
- name: Install Rust Problem Matcher
70+
if: matrix.os == 'ubuntu-latest'
71+
run: echo "::add-matcher::.github/rust.json"
72+
6973
- name: Cache Dependencies
7074
uses: Swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
7175
with:

0 commit comments

Comments
 (0)