Auto merge of #2213 - RalfJung:clippy, r=RalfJung
make clippy mandatory for bors, and silence another clippy lint We don't currently trigger this but I saw it in a PR and I'd rather evaluate this on a case-by-case basis during review, thank you clippy.
This commit is contained in:
commit
eedc78d216
3 changed files with 24 additions and 21 deletions
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
|
@ -86,22 +86,8 @@ jobs:
|
|||
- name: Test
|
||||
run: bash ./ci.sh
|
||||
|
||||
fmt:
|
||||
name: formatting (ignored by bors)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install latest nightly
|
||||
run: |
|
||||
rustup toolchain install nightly --component rustfmt
|
||||
rustup override set nightly
|
||||
- name: Formatting (miri, ui_test)
|
||||
run: cargo fmt --all --check
|
||||
- name: Formatting (cargo-miri)
|
||||
run: cargo fmt --manifest-path cargo-miri/Cargo.toml --all --check
|
||||
|
||||
clippy:
|
||||
name: clippy (ignored by bors)
|
||||
name: clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
@ -117,6 +103,20 @@ jobs:
|
|||
- name: Clippy (cargo-miri)
|
||||
run: cargo clippy --manifest-path cargo-miri/Cargo.toml --all-targets -- -D warnings
|
||||
|
||||
fmt:
|
||||
name: formatting (ignored by bors)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install latest nightly
|
||||
run: |
|
||||
rustup toolchain install nightly --component rustfmt
|
||||
rustup override set nightly
|
||||
- name: Formatting (miri, ui_test)
|
||||
run: cargo fmt --all --check
|
||||
- name: Formatting (cargo-miri)
|
||||
run: cargo fmt --manifest-path cargo-miri/Cargo.toml --all --check
|
||||
|
||||
# These jobs doesn't actually test anything, but they're only used to tell
|
||||
# bors the build completed, as there is no practical way to detect when a
|
||||
# workflow is successful listening to webhooks only.
|
||||
|
|
@ -126,7 +126,7 @@ jobs:
|
|||
end-success:
|
||||
name: bors build finished
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
needs: [build, clippy]
|
||||
if: github.event.pusher.name == 'bors' && success()
|
||||
steps:
|
||||
- name: mark the job as a success
|
||||
|
|
@ -134,7 +134,7 @@ jobs:
|
|||
end-failure:
|
||||
name: bors build finished
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
needs: [build, clippy]
|
||||
if: github.event.pusher.name == 'bors' && (failure() || cancelled())
|
||||
steps:
|
||||
- name: mark the job as a failure
|
||||
|
|
@ -144,7 +144,7 @@ jobs:
|
|||
cron-fail-notify:
|
||||
name: cronjob failure notification
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
needs: [build, clippy]
|
||||
if: github.event_name == 'schedule' && (failure() || cancelled())
|
||||
steps:
|
||||
- name: Install zulip-send
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
clippy::new_without_default,
|
||||
clippy::single_match,
|
||||
clippy::useless_format,
|
||||
clippy::derive_partial_eq_without_eq
|
||||
clippy::derive_partial_eq_without_eq,
|
||||
clippy::too_many_arguments
|
||||
)]
|
||||
|
||||
extern crate rustc_apfloat;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ fn wait_wake() {
|
|||
|
||||
static FUTEX: i32 = 0;
|
||||
|
||||
thread::spawn(move || {
|
||||
let t = thread::spawn(move || {
|
||||
thread::sleep(Duration::from_millis(200));
|
||||
unsafe {
|
||||
assert_eq!(libc::syscall(
|
||||
|
|
@ -155,6 +155,7 @@ fn wait_wake() {
|
|||
}
|
||||
|
||||
assert!((200..1000).contains(&start.elapsed().as_millis()));
|
||||
t.join().unwrap();
|
||||
}
|
||||
|
||||
fn wait_wake_bitset() {
|
||||
|
|
@ -162,7 +163,7 @@ fn wait_wake_bitset() {
|
|||
|
||||
static FUTEX: i32 = 0;
|
||||
|
||||
thread::spawn(move || {
|
||||
let t = thread::spawn(move || {
|
||||
thread::sleep(Duration::from_millis(200));
|
||||
unsafe {
|
||||
assert_eq!(libc::syscall(
|
||||
|
|
@ -202,6 +203,7 @@ fn wait_wake_bitset() {
|
|||
}
|
||||
|
||||
assert!((400..1000).contains(&start.elapsed().as_millis()));
|
||||
t.join().unwrap();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue