fix: improve contract experience #561
clippy
100 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 100 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
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 56 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:56:1
|
56 | pub struct Cli {
| ^^^^^^^^^^^^^^
Check warning on line 132 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};
... |
131 | | }
132 | | }
| |_^
|
= 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 238 in crates/pop-cli/src/commands/up/contract.rs
github-actions / clippy
`to_string` applied to a type that implements `Display` in `format!` args
warning: `to_string` applied to a type that implements `Display` in `format!` args
--> crates/pop-cli/src/commands/up/contract.rs:237:12
|
237 | .dim()
| ___________________________^
238 | | .to_string(),
| |________________________________^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
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 184 in crates/pop-contracts/src/up.rs
github-actions / clippy
manual implementation of `Option::map`
warning: manual implementation of `Option::map`
--> crates/pop-contracts/src/up.rs:180:13
|
180 | let hash = if let Some(code_hash) = instantiate_result.code_hash {
| ________________^
181 | | Some(format!("{:?}", code_hash))
182 | | } else {
183 | | None
184 | | };
| |_____^ help: try: `instantiate_result.code_hash.map(|code_hash| format!("{:?}", code_hash))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
Check warning on line 216 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:216:2
|
216 | pub fn license(&self) -> Option<&str> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 212 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:212:2
|
212 | pub fn is_audited(&self) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 206 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:206:2
|
206 | pub fn is_supported_version(&self, version: &str) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 202 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:202:2
|
202 | pub fn supported_versions(&self) -> Option<Vec<&str>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 138 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/templates.rs:138:2
|
138 | OpenZeppelinGeneric,
| ^^^^^^^^^^^^^^^^^^^
Check warning on line 51 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a struct field
warning: missing documentation for a struct field
--> crates/pop-parachains/src/templates.rs:51:2
|
51 | pub initial_endowment: String,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 50 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a struct field
warning: missing documentation for a struct field
--> crates/pop-parachains/src/templates.rs:50:2
|
50 | pub decimals: u8,
| ^^^^^^^^^^^^^^^^
Check warning on line 49 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a struct field
warning: missing documentation for a struct field
--> crates/pop-parachains/src/templates.rs:49:2
|
49 | pub symbol: String,
| ^^^^^^^^^^^^^^^^^^
Check warning on line 33 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/templates.rs:33:2
|
33 | Parity,
| ^^^^^^
Check warning on line 26 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/templates.rs:26:2
|
26 | OpenZeppelin,
| ^^^^^^^^^^^^
Check warning on line 19 in crates/pop-parachains/src/templates.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/templates.rs:19:2
|
19 | Pop,
| ^^^
Check warning on line 86 in crates/pop-parachains/src/new_pallet/new_pallet_options.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/new_pallet/new_pallet_options.rs:86:2
|
86 | CustomOrigin,
| ^^^^^^^^^^^^
Check warning on line 84 in crates/pop-parachains/src/new_pallet/new_pallet_options.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/new_pallet/new_pallet_options.rs:84:2
|
84 | GenesisConfig,
| ^^^^^^^^^^^^^
Check warning on line 82 in crates/pop-parachains/src/new_pallet/new_pallet_options.rs
github-actions / clippy
missing documentation for a variant
warning: missing documentation for a variant
--> crates/pop-parachains/src/new_pallet/new_pallet_options.rs:82:2
|
82 | DefaultConfig,
| ^^^^^^^^^^^^^