-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9dd4ccb
commit 40e77ee
Showing
2 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "cargo-common", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(warning|warn|error)(\\[(\\S*)\\])?: (.*)$", | ||
"severity": 1, | ||
"message": 4, | ||
"code": 3 | ||
}, | ||
{ | ||
"regexp": "^\\s+-->\\s(\\S+):(\\d+):(\\d+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-test", | ||
"pattern": [ | ||
{ | ||
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-fmt", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(Diff in (\\S+)) at line (\\d+):", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copied from Twilight's Lint workflow. | ||
# | ||
# https://github.com/twilight-rs/twilight/blob/trunk/.github/workflows/lint.yml | ||
name: Lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/matchers/rust.json" | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run clippy | ||
run: cargo clippy --tests -- -D warnings | ||
|
||
rustfmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
|
||
- name: Add problem matchers | ||
run: echo "::add-matcher::.github/matchers/rust.json" | ||
|
||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Run cargo fmt | ||
run: cargo fmt --all -- --check |