From 10cf9efa5a66284adcbe4d85f455b6489b858b3a Mon Sep 17 00:00:00 2001 From: supernovahs Date: Sun, 19 May 2024 21:23:35 +0530 Subject: [PATCH] add lint ci and fmt --- .github/workflows/lint.yml | 32 +++++++++++++++++++ .../services/bls_aggregation/src/bls_agg.rs | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..514f0864 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,32 @@ +name: lint + +on: + pull_request: + branches: + - '**' + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + name: fmt + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: rustfmt + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + + - name: Run cargo fmt + run: cargo +nightly fmt -- --check diff --git a/crates/services/bls_aggregation/src/bls_agg.rs b/crates/services/bls_aggregation/src/bls_agg.rs index 2c1bd90f..7ec22874 100644 --- a/crates/services/bls_aggregation/src/bls_agg.rs +++ b/crates/services/bls_aggregation/src/bls_agg.rs @@ -60,7 +60,7 @@ impl BlsAggregatorService { avs_registry_service: avs_registry_service, } } - + pub(crate) async fn write( &self, ) -> RwLockWriteGuard<'_, HashMap>> {