test(wallet-integration): unit tests for pop up contract #720
clippy
111 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 111 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 13 in crates/pop-cli/src/commands/new/mod.rs
github-actions / clippy
missing documentation for a macro
warning: missing documentation for a macro
--> crates/pop-cli/src/commands/new/mod.rs:13:1
|
13 | macro_rules! enum_variants {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 57 in crates/pop-cli/src/main.rs
github-actions / clippy
missing documentation for a struct
warning: missing documentation for a struct
--> crates/pop-cli/src/main.rs:57:1
|
57 | pub struct Cli {
| ^^^^^^^^^^^^^^
Check warning on line 133 in crates/pop-cli/src/main.rs
github-actions / clippy
missing documentation for the crate
warning: missing documentation for the crate
--> crates/pop-cli/src/main.rs:3:1
|
3 | / #[cfg(not(any(feature = "contract", feature = "parachain")))]
4 | | compile_error!("feature \"contract\" or feature \"parachain\" must be enabled");
5 | |
6 | | use anyhow::{anyhow, Result};
... |
132 | | }
133 | | }
| |_^
|
= note: requested on the command line with `-W missing-docs`
Check warning on line 258 in crates/pop-cli/src/commands/up/parachain.rs
github-actions / clippy
using `map` over `inspect`
warning: using `map` over `inspect`
--> crates/pop-cli/src/commands/up/parachain.rs:258:5
|
258 | .map(|b| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
258 ~ .inspect(|b| {
259 | if latest && b.stale() {
260 | b.use_latest()
261 ~ }
|
Check warning on line 43 in crates/pop-cli/src/commands/clean.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> crates/pop-cli/src/commands/clean.rs:43:6
|
43 | impl<'a, CLI: Cli> CleanCacheCommand<'a, CLI> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
43 - impl<'a, CLI: Cli> CleanCacheCommand<'a, CLI> {
43 + impl<CLI: Cli> CleanCacheCommand<'_, CLI> {
|
Check warning on line 168 in crates/pop-cli/src/commands/call/contract.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> crates/pop-cli/src/commands/call/contract.rs:168:57
|
168 | .map(|p| p.is_dir() && !has_contract_been_built(Some(&p)))
| ^^ help: change this to: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 126 in crates/pop-cli/src/wallet_integration.rs
github-actions / clippy
method `terminate` is never used
warning: method `terminate` is never used
--> crates/pop-cli/src/wallet_integration.rs:126:15
|
63 | impl WalletIntegrationManager {
| ----------------------------- method in this implementation
...
126 | pub async fn terminate(&mut self) -> anyhow::Result<()> {
| ^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 7 in crates/pop-cli/src/wallet_integration.rs
github-actions / clippy
unused import: `Deserialize`
warning: unused import: `Deserialize`
--> crates/pop-cli/src/wallet_integration.rs:7:13
|
7 | use serde::{Deserialize, Serialize};
| ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 365 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:361:1
|
361 | / pub fn get_code_hash_from_event<C: Config>(
362 | | upload_result: &UploadResult<C>,
363 | | // used for error reporting
364 | | metadata_code_hash: [u8; 32],
365 | | ) -> Result<String, Error> {
| |__________________________^
Check warning on line 225 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:222:1
|
222 | / pub async fn submit_signed_payload(
223 | | url: &str,
224 | | payload: String,
225 | | ) -> anyhow::Result<ExtrinsicEvents<SubstrateConfig>> {
| |_____________________________________________________^
Check warning on line 204 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:201:1
|
201 | / pub async fn instantiate_contract_signed(
202 | | url: &str,
203 | | payload: String,
204 | | ) -> anyhow::Result<InstantiateExecResult<SubstrateConfig>> {
| |___________________________________________________________^
Check warning on line 193 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:190:1
|
190 | / pub async fn upload_contract_signed(
191 | | url: &str,
192 | | payload: String,
193 | | ) -> anyhow::Result<UploadResult<SubstrateConfig>> {
| |__________________________________________________^
Check warning on line 169 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:167:1
|
167 | / pub async fn get_contract_code(
168 | | path: Option<&PathBuf>,
169 | | ) -> anyhow::Result<contract_extrinsics::WasmCode> {
| |__________________________________________________^
Check warning on line 138 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:135:1
|
135 | / pub async fn get_instantiate_payload(
136 | | instantiate_exec: InstantiateExec<DefaultConfig, DefaultEnvironment, Keypair>,
137 | | gas_limit: Weight,
138 | | ) -> anyhow::Result<Vec<u8>> {
| |____________________________^
Check warning on line 117 in crates/pop-contracts/src/up.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/up.rs:117:1
|
117 | pub async fn get_upload_payload(code: WasmCode, url: &str) -> anyhow::Result<Vec<u8>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 60 in crates/pop-contracts/src/templates.rs
github-actions / clippy
missing documentation for an enum
warning: missing documentation for an enum
--> crates/pop-contracts/src/templates.rs:60:1
|
60 | pub enum Contract {
| ^^^^^^^^^^^^^^^^^
Check warning on line 33 in crates/pop-contracts/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-contracts/src/templates.rs:33:2
|
33 | Psp,
| ^^^
Check warning on line 26 in crates/pop-contracts/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-contracts/src/templates.rs:26:2
|
26 | Erc,
| ^^^
Check warning on line 19 in crates/pop-contracts/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-contracts/src/templates.rs:19:2
|
19 | Examples,
| ^^^^^^^^
Check warning on line 30 in crates/pop-contracts/src/new.rs
github-actions / clippy
missing documentation for a function
warning: missing documentation for a function
--> crates/pop-contracts/src/new.rs:30:1
|
30 | pub fn is_valid_contract_name(name: &str) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: requested on the command line with `-W missing-docs`
Check warning on line 156 in crates/pop-contracts/src/up.rs
github-actions / clippy
using `clone` on type `H256` which implements the `Copy` trait
warning: using `clone` on type `H256` which implements the `Copy` trait
--> crates/pop-contracts/src/up.rs:156:4
|
156 | hash.clone(),
| ^^^^^^^^^^^^ help: try dereferencing it: `*hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 249 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> crates/pop-parachains/src/templates.rs:249:2
|
249 | pub fn license(&self) -> Option<&str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 245 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> crates/pop-parachains/src/templates.rs:245:2
|
245 | pub fn is_audited(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 239 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> crates/pop-parachains/src/templates.rs:239:2
|
239 | pub fn is_supported_version(&self, version: &str) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 235 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a method
warning: missing documentation for a method
--> crates/pop-parachains/src/templates.rs:235:2
|
235 | pub fn supported_versions(&self) -> Option<Vec<&str>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^