feat: add event checks to motsu #51
check.yml
on: pull_request
nightly / fmt
24s
nightly / doc
20s
ubuntu / stable / typos
4s
Matrix: clippy
Annotations
18 warnings
ubuntu / stable / typos
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
[clippy] crates/motsu/src/context/mod.rs#L100:
crates/motsu/src/context/mod.rs#L100
warning: unreachable statement
--> crates/motsu/src/context/mod.rs:100:9
|
99 | panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
| ---------------------------------------------------------------------------------------------------------------------------- any code following this expression is unreachable
100 | let mut context = EVM.entry(self.thread_name).or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
|
= note: `#[warn(unreachable_code)]` on by default
|
[clippy] crates/motsu/src/event.rs#L13:
crates/motsu/src/event.rs#L13
warning: unreachable expression
--> crates/motsu/src/event.rs:13:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ---------------------------------------------------------- any code following this expression is unreachable
13 | events.into_iter().rev().any(|event| expected == event)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
|
[clippy] crates/motsu/src/context/mod.rs#L99:
crates/motsu/src/context/mod.rs#L99
warning: variables can be used directly in the `format!` string
--> crates/motsu/src/context/mod.rs:99:9
|
99 | panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
|
99 - panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
99 + panic!("Data: {data:x?}, len: {len:x?}, topics: {topics:x?}, Log: {buffer:x?}, encoded_event: {encoded_event:x?}");
|
|
[clippy] crates/motsu/src/event.rs#L6:
crates/motsu/src/event.rs#L6
warning: docs for function which may panic missing `# Panics` section
--> crates/motsu/src/event.rs:6:1
|
6 | / pub fn emits_event<E>(expected: E) -> bool
7 | | where
8 | | E: SolEvent,
| |________________^
|
note: first possible panic found here
--> crates/motsu/src/event.rs:12:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]`
|
[clippy] crates/motsu/src/event.rs#L6:
crates/motsu/src/event.rs#L6
warning: this argument is passed by value, but not consumed in the function body
--> crates/motsu/src/event.rs:6:33
|
6 | pub fn emits_event<E>(expected: E) -> bool
| ^ help: consider taking a reference instead: `&E`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
|
[clippy] crates/motsu/src/event.rs#L12:
crates/motsu/src/event.rs#L12
warning: variables can be used directly in the `format!` string
--> crates/motsu/src/event.rs:12:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
12 - panic!("Expected: {:x?}, events: {:x?}", expected, events);
12 + panic!("Expected: {expected:x?}, events: {events:x?}");
|
|
[clippy] crates/motsu/src/context/mod.rs#L100:
crates/motsu/src/context/mod.rs#L100
warning: unreachable statement
--> crates/motsu/src/context/mod.rs:100:9
|
99 | panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
| ---------------------------------------------------------------------------------------------------------------------------- any code following this expression is unreachable
100 | let mut context = EVM.entry(self.thread_name).or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
|
= note: `#[warn(unreachable_code)]` on by default
|
[clippy] crates/motsu/src/event.rs#L13:
crates/motsu/src/event.rs#L13
warning: unreachable expression
--> crates/motsu/src/event.rs:13:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ---------------------------------------------------------- any code following this expression is unreachable
13 | events.into_iter().rev().any(|event| expected == event)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
|
[clippy] crates/motsu/src/context/mod.rs#L99:
crates/motsu/src/context/mod.rs#L99
warning: variables can be used directly in the `format!` string
--> crates/motsu/src/context/mod.rs:99:9
|
99 | panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `-W clippy::uninlined-format-args` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
|
99 - panic!("Data: {:x?}, len: {:x?}, topics: {:x?}, Log: {:x?}, encoded_event: {:x?}", data, len, topics, buffer, encoded_event);
99 + panic!("Data: {data:x?}, len: {len:x?}, topics: {topics:x?}, Log: {buffer:x?}, encoded_event: {encoded_event:x?}");
|
|
[clippy] crates/motsu/src/event.rs#L6:
crates/motsu/src/event.rs#L6
warning: docs for function which may panic missing `# Panics` section
--> crates/motsu/src/event.rs:6:1
|
6 | / pub fn emits_event<E>(expected: E) -> bool
7 | | where
8 | | E: SolEvent,
| |________________^
|
note: first possible panic found here
--> crates/motsu/src/event.rs:12:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_panics_doc
= note: `-W clippy::missing-panics-doc` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::missing_panics_doc)]`
|
[clippy] crates/motsu/src/event.rs#L6:
crates/motsu/src/event.rs#L6
warning: item name ends with its containing module's name
--> crates/motsu/src/event.rs:6:8
|
6 | pub fn emits_event<E>(expected: E) -> bool
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions
= note: `-W clippy::module-name-repetitions` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::module_name_repetitions)]`
|
[clippy] crates/motsu/src/event.rs#L6:
crates/motsu/src/event.rs#L6
warning: this argument is passed by value, but not consumed in the function body
--> crates/motsu/src/event.rs:6:33
|
6 | pub fn emits_event<E>(expected: E) -> bool
| ^ help: consider taking a reference instead: `&E`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
|
[clippy] crates/motsu/src/event.rs#L12:
crates/motsu/src/event.rs#L12
warning: variables can be used directly in the `format!` string
--> crates/motsu/src/event.rs:12:5
|
12 | panic!("Expected: {:x?}, events: {:x?}", expected, events);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
12 - panic!("Expected: {:x?}, events: {:x?}", expected, events);
12 + panic!("Expected: {expected:x?}, events: {events:x?}");
|
|
nightly / doc
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
beta / clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
nightly / fmt
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
stable / clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|