diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-04-24 18:07:57 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-04-24 18:07:57 +0300 |
commit | 334643f3b7b5a3e9c1b7f24b7e153663ee221d44 (patch) | |
tree | 26cbebf4c48fd63347065947dc79fd6cb8338c95 /check | |
parent | 1ff43a151c1b650ee0f82bc753183eb4dce82d05 (diff) | |
download | subplot-334643f3b7b5a3e9c1b7f24b7e153663ee221d44.tar.gz |
tests: don't check formatting or clippy in MSRV CI job
stable and MSRV versions of rustfmt make different formatting change.
Thus, one will fail. We prefer the stable version.
Sponsored-by: author
Diffstat (limited to 'check')
-rwxr-xr-x | check | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -231,13 +231,13 @@ def check_shell(r): r.runcmd_maybe(["shellcheck"] + sh) -def check_rust(r, strict=False): +def check_rust(r, strict=False, sloppy=False): """Run all checks for Rust code""" r.title("checking Rust code") r.runcmd(["cargo", "build", "--workspace", "--all-targets"]) - if r.got_cargo("clippy"): + if r.got_cargo("clippy") and not sloppy: argv = [ "cargo", "clippy", @@ -254,7 +254,8 @@ def check_rust(r, strict=False): sys.exit("Strict Rust checks specified, but clippy was not found") r.runcmd(["cargo", "test", "--workspace"]) - r.runcmd(["cargo", "fmt", "--", "--check"]) + if not sloppy: + r.runcmd(["cargo", "fmt", "--", "--check"]) def check_subplots(r): @@ -360,6 +361,9 @@ def parse_args(): p.add_argument( "--strict", action="store_true", help="don't allow compiler warnings" ) + p.add_argument( + "--sloppy", action="store_true", help="don't check formatting or with clippy" + ) all_whats = ["tooling", "python", "shell", "rust", "subplots"] p.add_argument( @@ -391,7 +395,7 @@ def main(): elif what == "shell": check_shell(r) elif what == "rust": - check_rust(r, strict=args.strict) + check_rust(r, strict=args.strict, sloppy=args.sloppy) elif what == "subplots": check_subplots(r) elif what == "tooling": |