Problem
It seems that cargo --locked clippy is equivalent to cargo clippy (without the --locked flag) and not cargo clippy --locked, which is very confusing.
Steps
cargo init foo
cd foo
cargo clippy --locked fails (correctly, as there is no Cargo.lock)
cargo --locked clippy succeeds and creates Cargo.lock (incorrectly)
Possible Solution(s)
No response
Notes
(also checked on 2022-11-14 nightly)
Version
$ cargo version --verbose
cargo 1.65.0 (4bc8f24d3 2022-10-20)
release: 1.65.0
commit-hash: 4bc8f24d3e899462e43621aab981f6383a370365
commit-date: 2022-10-20
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: CentOS 9.0.0 [64-bit]
$ cargo +nightly version --verbose
cargo 1.67.0-nightly (16b097879 2022-11-14)
release: 1.67.0-nightly
commit-hash: 16b097879b6f117c8ae698aab054c87f26ff325e
commit-date: 2022-11-14
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: CentOS 9.0.0 [64-bit]
Problem
It seems that
cargo --locked clippyis equivalent tocargo clippy(without the--lockedflag) and notcargo clippy --locked, which is very confusing.Steps
cargo init foocd foocargo clippy --lockedfails (correctly, as there is noCargo.lock)cargo --locked clippysucceeds and createsCargo.lock(incorrectly)Possible Solution(s)
No response
Notes
(also checked on 2022-11-14 nightly)
Version