Skip to content

Commit 899d3a7

Browse files
committed
Add ink! linting MVP stage
1 parent 4195197 commit 899d3a7

31 files changed

+1609
-287
lines changed

.github/workflows/macos.yml

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
run: |
5151
wasm-opt --version
5252
cargo -vV
53+
cargo install cargo-dylint dylint-link
54+
cargo dylint --version
5355
cargo run -- contract --version
5456
cargo run -- contract new foobar
5557
echo "[workspace]" >> foobar/Cargo.toml

.github/workflows/windows.yml

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
run: |
5454
wasm-opt --version
5555
cargo -vV
56+
cargo install cargo-dylint dylint-link
57+
cargo dylint --version
5658
cargo run -- contract --version
5759
cargo run -- contract new foobar
5860
echo "[workspace]" >> foobar/Cargo.toml

.gitlab-ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ workflow:
3939
- cargo -vV
4040
- rustc -vV
4141
- rustup show
42+
- cargo dylint --version
4243
- bash --version
4344
- ./scripts/ci/pre_cache.sh
4445
# global RUSTFLAGS overrides the linker args so this way is better to pass the flags
4546
- printf '[build]\nrustflags = ["-C", "link-dead-code"]\n' > ${CARGO_HOME}/config
4647
- sccache -s
48+
49+
# needed until https://github.com/mozilla/sccache/issues/1000 is fixed
50+
- unset RUSTC_WRAPPER
51+
4752
- git show
4853
rules:
4954
- if: $CI_PIPELINE_SOURCE == "web"
@@ -81,6 +86,18 @@ clippy:
8186

8287
#### stage: test (all features)
8388

89+
test-dylint:
90+
stage: test
91+
<<: *docker-env
92+
script:
93+
- cd dylint/
94+
- rustup component add rustfmt clippy rust-src
95+
- git show
96+
- cargo check --verbose
97+
- cargo fmt --verbose --all -- --check
98+
- cargo clippy --verbose -- -D warnings;
99+
- cargo test --verbose --workspace --all-features
100+
84101
test:
85102
stage: test
86103
<<: *docker-env

0 commit comments

Comments
 (0)