-
Notifications
You must be signed in to change notification settings - Fork 480
Linter: Prepare the ink_linting crates for publishing
#2060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d7a0d6b
feat: Use custom `clippy_utils`
jubnzv 28ef67d
Merge remote-tracking branch 'origin/master' into publish-linting
jubnzv cff5707
feat(all): Use `parity-clippy-utils`
jubnzv c5120dd
feat(cargo): Inherit common options from workspace' Cargo.toml
jubnzv 6e5be12
feat(utils): Add README and LICENSE
jubnzv 7fab833
chore: `s/ink_utils/ink_linting_utils/g`
jubnzv b977fc7
chore(cargo): Move the common dependency on workspace level
jubnzv 2ebfbc7
chore: Fix typo
jubnzv ad3105c
chore(mandatory): Set explicit versions of the ink! deps
jubnzv e882981
chore(mandatory): Change the crate description
jubnzv 1614cfa
chore(extra): Prepare `Cargo.toml` for publishing
jubnzv 9a113ea
chore: Add the changelog entry
jubnzv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,21 @@ resolver = "2" | |
| members = [ | ||
| "mandatory", | ||
| "extra", | ||
| "utils", | ||
| ] | ||
|
|
||
| [workspace.package] | ||
| version = "5.0.0-rc" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
| license = "Apache-2.0" | ||
| repository = "https://github.com/paritytech/ink" | ||
| homepage = "https://www.parity.io/" | ||
| keywords = ["parity", "blockchain", "edsl", "dylint", "linting"] | ||
|
|
||
| [workspace.dependencies] | ||
| ink_linting_utils = { version = "=5.0.0-rc", path = "utils" } | ||
|
|
||
| [workspace.metadata.dylint] | ||
| libraries = [ | ||
| { path = "mandatory" }, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,41 @@ | ||
| [package] | ||
| name = "ink_linting" | ||
| version = "5.0.0-rc" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
| publish = false | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
|
|
||
| license = "Apache-2.0" | ||
| license.workspace = true | ||
| readme = "README.md" | ||
| repository = "https://github.com/paritytech/ink" | ||
| repository.workspace = true | ||
| documentation = "https://docs.rs/ink_linting" | ||
| homepage = "https://github.com/paritytech/ink" | ||
| description = "Extra linting rules for ink! smart contracts" | ||
| keywords = ["parity", "blockchain", "ink", "smart contracts", "substrate"] | ||
| homepage.workspace = true | ||
| description = "Extra ink! linting rules" | ||
| keywords.workspace = true | ||
| include = ["Cargo.toml", "*.rs", "LICENSE"] | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib"] | ||
|
|
||
| [dependencies] | ||
| clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "1d334696587ac22b3a9e651e7ac684ac9e0697b2" } | ||
| dylint_linting = "2.1.12" | ||
| if_chain = "1.0.2" | ||
| log = "0.4.14" | ||
| regex = "1.5.4" | ||
| # ink! dependencies used in the linter implementation | ||
| ink_env = { path = "../../crates/env", default-features = false } | ||
| ink_linting_utils = { workspace = true } | ||
| ink_env = { version = "=5.0.0-rc", path = "../../crates/env", default-features = false } | ||
|
|
||
| [dev-dependencies] | ||
| dylint_testing = "2.1.12" | ||
| # The following are ink! dependencies, they are only required for the `ui` tests. | ||
| ink = { path = "../../crates/ink", default-features = false, features = ["std"] } | ||
| ink_metadata = { path = "../../crates/metadata", default-features = false } | ||
| ink_primitives = { path = "../../crates/primitives", default-features = false } | ||
| ink_storage = { path = "../../crates/storage", default-features = false } | ||
|
|
||
| # The ink! dependencies used to build the `ui` tests and to compile the linting | ||
| # library with `--default-features=std` (see the `features` section bellow). | ||
| # | ||
| # These cannot be moved to the workspace level because `cargo` does not provide | ||
| # the `[[workspace.dev-dependencies]]` directive. | ||
| ink = { version = "=5.0.0-rc", path = "../../crates/ink", default-features = false, features = ["std"] } | ||
| ink_metadata = { version = "=5.0.0-rc", path = "../../crates/metadata", default-features = false } | ||
| ink_primitives = { version = "=5.0.0-rc", path = "../../crates/primitives", default-features = false } | ||
| ink_storage = { version = "=5.0.0-rc", path = "../../crates/storage", default-features = false } | ||
| scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } | ||
| scale-info = { version = "2.6", default-features = false, features = ["derive"] } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,41 @@ | ||
| [package] | ||
| name = "ink_linting_mandatory" | ||
| version = "5.0.0-rc" | ||
| authors = ["Parity Technologies <[email protected]>"] | ||
| edition = "2021" | ||
| publish = false | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
|
|
||
| license = "Apache-2.0" | ||
| license.workspace = true | ||
| readme = "README.md" | ||
| repository = "https://github.com/paritytech/ink" | ||
| documentation = "https://docs.rs/ink_linting" | ||
| homepage = "https://github.com/paritytech/ink" | ||
| description = "Mandatory ink! linting rules integrated in contracts' build process" | ||
| keywords = ["parity", "blockchain", "ink", "smart contracts", "substrate"] | ||
| repository.workspace = true | ||
| documentation = "https://docs.rs/ink_linting_mandatory" | ||
| homepage.workspace = true | ||
| description = "Mandatory ink! linting rules" | ||
| keywords.workspace = true | ||
| include = ["Cargo.toml", "*.rs", "LICENSE"] | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib"] | ||
|
|
||
| [dependencies] | ||
| clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "1d334696587ac22b3a9e651e7ac684ac9e0697b2" } | ||
| dylint_linting = "2.1.12" | ||
| if_chain = "1.0.2" | ||
| log = "0.4.14" | ||
| regex = "1.5.4" | ||
| ink_linting_utils = { workspace = true } | ||
|
|
||
| [dev-dependencies] | ||
| dylint_testing = "2.1.12" | ||
| # The following are ink! dependencies, they are only required for the `ui` tests. | ||
| ink_env = { path = "../../crates/env", default-features = false } | ||
| ink = { path = "../../crates/ink", default-features = false, features = ["std"] } | ||
| ink_metadata = { path = "../../crates/metadata", default-features = false } | ||
| ink_primitives = { path = "../../crates/primitives", default-features = false } | ||
| ink_storage = { path = "../../crates/storage", default-features = false } | ||
|
|
||
| # The ink! dependencies used to build the `ui` tests and to compile the linting | ||
| # library with `--default-features=std` (see the `features` section bellow). | ||
| # | ||
| # These cannot be moved to the workspace level because `cargo` does not provide | ||
| # the `[[workspace.dev-dependencies]]` directive. | ||
| ink = { version = "=5.0.0-rc", path = "../../crates/ink", default-features = false, features = ["std"] } | ||
| ink_env = { version = "=5.0.0-rc", path = "../../crates/env", default-features = false } | ||
| ink_metadata = { version = "=5.0.0-rc", path = "../../crates/metadata", default-features = false } | ||
| ink_primitives = { version = "=5.0.0-rc", path = "../../crates/primitives", default-features = false } | ||
| ink_storage = { version = "=5.0.0-rc", path = "../../crates/storage", default-features = false } | ||
| scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } | ||
| scale-info = { version = "2.6", default-features = false, features = ["derive"] } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [package] | ||
| name = "ink_linting_utils" | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
|
|
||
| license.workspace = true | ||
| readme = "README.md" | ||
| repository.workspace = true | ||
| documentation = "https://docs.rs/ink_linting_utils" | ||
| homepage.workspace = true | ||
| description = "Utilities used internally in ink_linting" | ||
| keywords.workspace = true | ||
| include = ["Cargo.toml", "*.rs", "LICENSE"] | ||
|
|
||
| [dependencies] | ||
| if_chain = "1.0.2" | ||
| parity_clippy_utils = "0.1.73" | ||
|
|
||
| [package.metadata.rust-analyzer] | ||
| rustc_private = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../LICENSE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # ink! linting utilities | ||
| This crate implements various utility functions used in `ink_linting` crates. It also provides access to the specific version of the `clippy_utils` crate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.