Skip to content

Commit fa62991

Browse files
committed
Add clippy matcher
1 parent bb62530 commit fa62991

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.github/clippy-matcher.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"owner":"clippy",
3+
"problemMatcher": [
4+
{
5+
"owner": "cargo-clippy",
6+
"pattern": [
7+
{
8+
"regexp": "^(error|warning|info|Error|Warning|Info): (.*)$",
9+
"severity": 1,
10+
"message": 2
11+
},
12+
{
13+
"regexp": "^\\s+--> (.*):(\\d+):(\\d+)$",
14+
"file": 1,
15+
"line": 2,
16+
"column":3
17+
}
18+
]
19+
}
20+
]
21+
}

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
~/.cargo/git/db/
2828
target/
2929
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
30+
- run: echo "::add-matcher::.github/clippy-matcher.json"
3031
- run: cargo clippy --all-targets --all-features -- -D warnings
3132
run-tests:
3233
runs-on: ubuntu-latest

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ mod tests {
201201
#[tokio::test]
202202
#[should_panic]
203203
async fn test_create_document() {
204+
let blaA="";
204205
// Create the inputs your handler expects
205206
let input: TypedMultipart<TransformRequest> = TypedMultipart(TransformRequest {
206207
image: FieldData {

0 commit comments

Comments
 (0)