From 82a0b7fdf06c716cd618487963c58d0eb565e36b Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Sun, 10 Aug 2025 03:53:36 +0400 Subject: [PATCH] chore: lintnig --- scripts/format.sh | 12 ++++++++++-- tests/common/mod.rs | 1 - 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/format.sh b/scripts/format.sh index 218e728..5552ccc 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,3 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash +set -euo pipefail -cargo clippy --fix --allow-dirty --all-targets --all-features -- -D warnings -D clippy::all && cargo fmt --all \ No newline at end of file +# Run rustfmt first for quick formatting +cargo fmt --all + +# Run clippy across all targets and features; fail on any warning +cargo clippy --fix --allow-dirty --all-targets --all-features -- -D warnings -D clippy::all + +# Additionally, run clippy for tests explicitly to catch test-only lints +cargo clippy --fix --allow-dirty --tests -- -D warnings -D clippy::all \ No newline at end of file diff --git a/tests/common/mod.rs b/tests/common/mod.rs index dc16c40..13e1256 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -768,7 +768,6 @@ impl BundlerTestHelper { let output = match direct { Ok(o) => Ok(o), Err(e) if e.kind() == std::io::ErrorKind::NotFound => { - let mut cmd = Command::new("cmd"); let mut all_args: Vec = Vec::with_capacity(1 + 1 + args.len()); all_args.push("/C".to_string()); all_args.push(exec_to_run.display().to_string());