MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / run_clippy

Function run_clippy

scripts/test.py:9–40  ·  view source on GitHub ↗
(
    variants: List[Variant],
    features: Mapping[str, Sequence[str]] | None = None,
    target: str | None = None,
    fail_on_warn: bool = False,
)

Source from the content-addressed store, hash-verified

7
8
9def run_clippy(
10 variants: List[Variant],
11 features: Mapping[str, Sequence[str]] | None = None,
12 target: str | None = None,
13 fail_on_warn: bool = False,
14):
15 args = [cargo_cmd_name(), "clippy", "--locked", "--workspace", "--exclude", "zbus", "--exclude", "zbus_names"]
16
17 if target:
18 args.extend(["--target", target])
19
20 if Variant.FULL not in variants:
21 args.extend(["--exclude", DESKTOP_PACKAGE_NAME, "--exclude", DESKTOP_FUZZ_PACKAGE_NAME])
22
23 if features:
24 args.extend(
25 [
26 "--features",
27 ",".join(set(itertools.chain.from_iterable(features.values()))),
28 ]
29 )
30
31 if fail_on_warn:
32 args.extend(["--", "-D", "warnings"])
33
34 run_cmd(
35 args,
36 env={
37 **os.environ,
38 **rust_env(release=False),
39 },
40 )
41
42
43def run_cargo_tests(

Callers 1

all_testsFunction · 0.70

Calls 5

cargo_cmd_nameFunction · 0.90
run_cmdFunction · 0.90
rust_envFunction · 0.90
joinMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected