-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlint.sh
More file actions
executable file
·38 lines (31 loc) · 1.1 KB
/
lint.sh
File metadata and controls
executable file
·38 lines (31 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Run linters with both stable and nightly Rust toolchains
# This script prevents build artifact conflicts between toolchains by cleaning between runs
set -euo pipefail
# Function to display current toolchain information
show_toolchain_info() {
local toolchain=$1
echo "============================================"
echo "🔧 Current Toolchain: $toolchain"
echo "============================================"
rustup run "$toolchain" rustc --version
rustup run "$toolchain" cargo --version
echo "Target directory: $(pwd)/target"
echo "============================================"
echo
}
echo "🧪 Running linters with both stable and nightly Rust toolchains"
echo
echo "Testing with stable toolchain..."
show_toolchain_info "stable"
rustup run stable cargo run --bin linter all
echo
echo "🧹 Cleaning build artifacts to prevent toolchain conflicts..."
cargo clean
echo "Build artifacts cleaned successfully"
echo
echo "Testing with nightly toolchain..."
show_toolchain_info "nightly"
rustup run nightly cargo run --bin linter all
echo
echo "✅ All linting tests passed!"