-
Notifications
You must be signed in to change notification settings - Fork 482
/
Copy pathlint.sh
executable file
·56 lines (48 loc) · 2.24 KB
/
lint.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -eu
cargo_feature() {
echo "checking $1 with features $2"
cargo clippy --manifest-path=$1/Cargo.toml --all-targets --features "$2" --no-default-features -- \
`# Exit with a nonzero code if there are clippy warnings` \
-Dwarnings
}
if rustup component add clippy; then
crates=( "opentelemetry"
"opentelemetry-http"
"opentelemetry-jaeger-propagator"
"opentelemetry-appender-log"
"opentelemetry-appender-tracing"
"opentelemetry-otlp"
"opentelemetry-prometheus"
"opentelemetry-proto"
"opentelemetry-sdk"
"opentelemetry-semantic-conventions"
"opentelemetry-stdout"
"opentelemetry-zipkin")
for crate in "${crates[@]}"; do
cargo clippy --manifest-path=$crate/Cargo.toml --all-targets --all-features -- \
`# Exit with a nonzero code if there are clippy warnings` \
-Dwarnings
done
cargo_feature opentelemetry "trace,metrics,logs,spec_unstable_logs_enabled,testing"
cargo_feature opentelemetry-otlp "default"
cargo_feature opentelemetry-otlp "default,tls"
cargo_feature opentelemetry-otlp "default,tls-roots"
cargo_feature opentelemetry-otlp "http-proto"
cargo_feature opentelemetry-otlp "http-proto, reqwest-blocking-client"
cargo_feature opentelemetry-otlp "http-proto, reqwest-client"
cargo_feature opentelemetry-otlp "http-proto, reqwest-rustls"
cargo_feature opentelemetry-otlp "metrics"
cargo_feature opentelemetry-jaeger-propagator "default"
cargo_feature opentelemetry-proto "default"
cargo_feature opentelemetry-proto "full"
cargo_feature opentelemetry-proto "gen-tonic,trace"
cargo_feature opentelemetry-proto "gen-tonic,trace,with-serde"
cargo_feature opentelemetry-proto "gen-tonic,trace,with-schemars,with-serde"
cargo_feature opentelemetry-proto "gen-tonic,metrics"
cargo_feature opentelemetry-proto "gen-tonic,metrics,with-serde"
cargo_feature opentelemetry-proto "gen-tonic,metrics,with-schemars,with-serde"
cargo_feature opentelemetry-proto "gen-tonic,logs"
cargo_feature opentelemetry-proto "gen-tonic,logs,with-serde"
cargo_feature opentelemetry-proto "gen-tonic,logs,with-schemars,with-serde"
fi