File tree 16 files changed +49
-39
lines changed 16 files changed +49
-39
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,29 @@ repository = "https://github.com/paritytech/subxt"
36
36
documentation = " https://docs.rs/subxt"
37
37
homepage = " https://www.parity.io/"
38
38
39
+ [workspace .lints .rust ]
40
+ bad_style = " deny"
41
+ improper_ctypes = " deny"
42
+ missing_docs = " deny"
43
+ non_shorthand_field_patterns = " deny"
44
+ no_mangle_generic_items = " deny"
45
+ overflowing_literals = " deny"
46
+ path_statements = " deny"
47
+ patterns_in_fns_without_body = " deny"
48
+ unconditional_recursion = " deny"
49
+ unused_allocation = " deny"
50
+ unused_comparisons = " deny"
51
+ unused_parens = " deny"
52
+ while_true = " deny"
53
+ trivial_casts = " deny"
54
+ trivial_numeric_casts = " deny"
55
+ unused_crate_dependencies = " deny"
56
+ unused_extern_crates = " deny"
57
+
58
+ [workspace .lints .clippy ]
59
+ type_complexity = " allow"
60
+ all = " deny"
61
+
39
62
[workspace .dependencies ]
40
63
async-trait = " 0.1.74"
41
64
assert_matches = " 1.5.0"
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ description = "Command line utilities for working with subxt codegen"
16
16
name = " subxt"
17
17
path = " src/main.rs"
18
18
19
+ [lints ]
20
+ workspace = true
21
+
19
22
[features ]
20
23
# Compute the state root hash from the genesis entry.
21
24
# Enable this to create a smaller chain spec file.
Original file line number Diff line number Diff line change
1
+ //! Build script for the CLI.
2
+
1
3
use std:: { borrow:: Cow , process:: Command } ;
2
4
3
5
fn main ( ) {
Original file line number Diff line number Diff line change 2
2
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
3
3
// see LICENSE for license details.
4
4
5
- #! [ deny ( unused_crate_dependencies ) ]
5
+ //! The Subxt CLI tool.
6
6
7
7
mod commands;
8
8
mod utils;
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ documentation = "https://docs.rs/subxt-codegen"
12
12
homepage.workspace = true
13
13
description = " Generate an API for interacting with a substrate node from FRAME metadata"
14
14
15
+ [lints ]
16
+ workspace = true
17
+
15
18
[features ]
16
19
default = []
17
20
fetch-metadata = [" dep:jsonrpsee" , " dep:tokio" , " dep:frame-metadata" ]
Original file line number Diff line number Diff line change 6
6
//! This is used by the `#[subxt]` macro and `subxt codegen` CLI command, but can also
7
7
//! be used directly if preferable.
8
8
9
- #![ deny( unused_crate_dependencies, missing_docs) ]
10
-
11
9
mod api;
12
10
mod ir;
13
11
mod types;
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ homepage.workspace = true
14
14
description = " Light Client for chain interaction"
15
15
keywords = [" parity" , " substrate" , " blockchain" ]
16
16
17
+ [lints ]
18
+ workspace = true
19
+
17
20
[features ]
18
21
default = [" native" ]
19
22
Original file line number Diff line number Diff line change 10
10
//!
11
11
//! This leverages the smoldot crate to connect to the chain.
12
12
13
- #![ deny(
14
- missing_docs,
15
- unused_crate_dependencies,
16
- unused_extern_crates,
17
- clippy:: all
18
- ) ]
19
- #![ allow( clippy:: type_complexity) ]
20
-
21
13
#[ cfg( any(
22
14
all( feature = "web" , feature = "native" ) ,
23
15
not( any( feature = "web" , feature = "native" ) )
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ documentation.workspace = true
13
13
homepage.workspace = true
14
14
description = " Generate types and helpers for interacting with Substrate runtimes."
15
15
16
+ [lints ]
17
+ workspace = true
18
+
16
19
[features ]
17
20
web = [" subxt-codegen/web" ]
18
21
Original file line number Diff line number Diff line change 2
2
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
3
3
// see LICENSE for license details.
4
4
5
- extern crate proc_macro ;
5
+ //! Subxt macro for generating Substrate runtime interfaces.
6
6
7
7
use codec:: Decode ;
8
8
use darling:: { ast:: NestedMeta , FromMeta } ;
@@ -73,7 +73,8 @@ struct SubstituteType {
73
73
with : syn:: Path ,
74
74
}
75
75
76
- // Note: docs for this are in the subxt library; don't add any here as they will be appended.
76
+ // Note: docs for this are in the subxt library; don't add further docs here as they will be appended.
77
+ /// The subxt macro.
77
78
#[ proc_macro_attribute]
78
79
#[ proc_macro_error]
79
80
pub fn subxt ( args : TokenStream , input : TokenStream ) -> TokenStream {
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ documentation.workspace = true
13
13
homepage.workspace = true
14
14
description = " Command line utilities for checking metadata compatibility between nodes."
15
15
16
+ [lints ]
17
+ workspace = true
18
+
16
19
[dependencies ]
17
20
codec = { package = " parity-scale-codec" , workspace = true , features = [" derive" ] }
18
21
frame-metadata = { workspace = true }
Original file line number Diff line number Diff line change 2
2
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
3
3
// see LICENSE for license details.
4
4
5
+ //! Benchmarks for metadata hashing.
6
+
5
7
use codec:: Decode ;
6
8
use criterion:: * ;
7
9
use frame_metadata:: { RuntimeMetadata , RuntimeMetadataPrefixed } ;
Original file line number Diff line number Diff line change 14
14
//! 2. Obtaining [`frame_metadata::RuntimeMetadataPrefixed`], and then
15
15
//! using `.try_into()` to convert it into [`Metadata`].
16
16
17
- #![ deny( missing_docs) ]
18
-
19
17
mod from_into;
20
18
mod utils;
21
19
Original file line number Diff line number Diff line change 13
13
//! Enable the `subxt` feature to enable use of this [`sr25519::Keypair`] in signing
14
14
//! subxt transactions for chains supporting sr25519 signatures.
15
15
16
- #![ deny( missing_docs) ]
17
-
18
16
#[ macro_use]
19
17
mod utils;
20
18
mod crypto;
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ homepage.workspace = true
14
14
description = " Submit extrinsics (transactions) to a substrate node via RPC"
15
15
keywords = [" parity" , " substrate" , " blockchain" ]
16
16
17
+ [lints ]
18
+ workspace = true
19
+
17
20
[features ]
18
21
# For dev and documentation reasons we enable more features than are often desired.
19
22
# it's recommended to use `--no-default-features` and then select what you need.
Original file line number Diff line number Diff line change 10
10
//!
11
11
//! Take a look at [the Subxt guide](book) to learn more about how to use Subxt.
12
12
13
- #![ deny(
14
- bad_style,
15
- improper_ctypes,
16
- missing_docs,
17
- non_shorthand_field_patterns,
18
- no_mangle_generic_items,
19
- overflowing_literals,
20
- path_statements,
21
- patterns_in_fns_without_body,
22
- unconditional_recursion,
23
- unused_allocation,
24
- unused_comparisons,
25
- unused_parens,
26
- while_true,
27
- trivial_casts,
28
- trivial_numeric_casts,
29
- unused_crate_dependencies,
30
- unused_extern_crates,
31
- clippy:: all
32
- ) ]
33
- #![ allow( clippy:: type_complexity) ]
34
-
35
13
#[ cfg( any(
36
14
all( feature = "web" , feature = "native" ) ,
37
15
not( any( feature = "web" , feature = "native" ) )
You can’t perform that action at this time.
0 commit comments