Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[package]
name = "ink_linting"
version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]
edition = "2021"
publish = false
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/paritytech/cargo-contract"
documentation = "https://docs.rs/ink_linting"
homepage = "https://github.com/paritytech/cargo-contract"
description = "Linting tool for ink! smart contracts."
keywords = ["parity", "blockchain", "ink", "smart contracts", "substrate"]
include = ["Cargo.toml", "*.rs", "LICENSE"]
[lib]
crate-type = ["cdylib"]
[dependencies]
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", tag = "rust-1.58.0" }
dylint_linting = "1.0.13"
if_chain = "1.0.2"
log = "0.4.14"
regex = "1.5.4"
[dev-dependencies]
dylint_testing = "1.0.13"
# The following are ink! dependencies, they are only required for the `ui` tests.
ink_primitives = { git = "https://github.com/paritytech/ink", default-features = false }
ink_metadata = { git = "https://github.com/paritytech/ink", default-features = false, features = ["derive"] }
ink_env = { git = "https://github.com/paritytech/ink", default-features = false }
ink_storage = { git = "https://github.com/paritytech/ink", default-features = false }
ink_lang = { git = "https://github.com/paritytech/ink", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"] }
# For the moment we have to include the tests as examples and
# then use `dylint_testing::ui_test_examples`.
#
# The reason is that the `dylint_testing` API currently does not
# provide any other option to run the tests on those files
# *while giving us the option to specify the dependencies*.
#
# Those files require the ink! dependencies though, by having
# them as examples here, they inherit the `dev-dependencies`.
[[example]]
name = "fail_mapping_one_constructor"
path = "ui/fail/mapping-one-constructor.rs"
[[example]]
name = "fail_mapping_two_constructors_01"
path = "ui/fail/mapping-two-constructors-01.rs"
[[example]]
name = "fail_mapping_two_constructors_02"
path = "ui/fail/mapping-two-constructors-02.rs"
[[example]]
name = "fail_mapping_nested_initialize_call"
path = "ui/fail/mapping-nested-initialize-call.rs"
[[example]]
name = "pass_mapping_one_constructor"
path = "ui/pass/mapping-one-constructor.rs"
[[example]]
name = "pass_mapping_two_constructors"
path = "ui/pass/mapping-two-constructors.rs"
[[example]]
name = "pass_mapping_additional_logic_constructor"
path = "ui/pass/mapping-additional-logic-constructor.rs"
[[example]]
name = "pass_dont_use_fully_qualified_path"
path = "ui/pass/mapping-dont-use-fully-qualified-path.rs"
[package.metadata.rust-analyzer]
rustc_private = true
[workspace]
[features]
default = ["std"]
std = [
"ink_metadata/std",
"ink_env/std",
"ink_storage/std",
"ink_primitives/std",
"scale/std",
"scale-info/std",
]
ink-as-dependency = []