From 1e2ff9885714ec7468115281293974c0f7ac097a Mon Sep 17 00:00:00 2001 From: Alex Todorov Date: Tue, 20 Dec 2022 20:59:12 +0000 Subject: [PATCH] Add sanity check to tell us if we're using log::warn! directly --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8ef3d4539..697669834f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,16 @@ jobs: run: | ./scripts/check-parity-bw-extrinsics-benchmarks-weights.sh + - name: Check for direct usage of log::warn vs. warn_or_panic in migrations + run: | + OUTPUT=$(find -wholename "*/migrations/*.rs" | xargs grep log::warn) + if [ -n "$OUTPUT" ]; then + echo "FAIL" + echo "$OUTPUT" + exit 1 + fi + echo "PASS" + fmt: name: Rustfmt runs-on: ubuntu-latest