diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 408335a3..1a8df083 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -78,11 +78,19 @@ jobs: components: "clippy" override: true + - name: "Set allowed lints" + run: | + if [ "${{ matrix.toolchain }}" == "nightly" ]; then + echo "ALLOWED=-A non_local_definitions" >> $GITHUB_ENV + else + echo "ALLOWED=" >> $GITHUB_ENV + fi + - name: "Run Clippy (default)" run: | - cargo clippy --all --all-targets -- -D warnings + cargo clippy --all --all-targets -- -D warnings $ALLOWED - name: "Run Clippy (no_std)" run: | - cargo clippy --package starknet-crypto --no-default-features -- -D warnings - cargo clippy --package starknet-crypto --no-default-features --features alloc -- -D warnings + cargo clippy --package starknet-crypto --no-default-features -- -D warnings $ALLOWED + cargo clippy --package starknet-crypto --no-default-features --features alloc -- -D warnings $ALLOWED diff --git a/starknet-crypto/src/test_utils.rs b/starknet-crypto/src/test_utils.rs index 83f587f7..cbe0f8ef 100644 --- a/starknet-crypto/src/test_utils.rs +++ b/starknet-crypto/src/test_utils.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use crate::FieldElement; pub fn field_element_from_be_hex(hex: &str) -> FieldElement {