File: clippy

package info (click to toggle)
rust-rustls 0.23.26%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,816 kB
  • sloc: sh: 199; python: 181; makefile: 23
file content (37 lines) | stat: -rwxr-xr-x 951 bytes parent folder | download | duplicates (5)
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
#!/bin/bash

# Runs clippy on every package in this repo.
#
# Passes through any extra arguments to each invocation.
#
# Exits non-zero if any clippy invocation exits non-zero,
# but always runs them all.

rc=0
script_args="$@"

function run_clippy() {
  if ! ( set -x ; cargo clippy --locked "$@" $script_args ) ; then
    rc=$PIPESTATUS
  fi
}

# because examples enable rustls' features, `--workspace --no-default-features` is not
# the same as `--package rustls --no-default-features` so run it separately
run_clippy --package rustls --no-default-features --all-targets

# run all workspace members (individually, because we don't want feature unification)
for p in $(admin/all-workspace-members) ; do
  case "$p" in
    *)
      ALL_FEATURES="--all-features"
      ;;
  esac

  run_clippy --package $p $ALL_FEATURES --all-targets
done

# not part of the workspace
run_clippy --manifest-path=fuzz/Cargo.toml --all-features --all-targets

exit $rc