-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: clippy 已经指定了 --no-deps 参数,依然会检查依赖库 #31
Labels
非本仓库 bug
来自框架、依赖等不属于本仓库能解决的 bug
Comments
应该是 # 首次检查 axdma,的确报告了依赖项 axalloc 的检查
os-checker/tmp $ cargo clippy --no-deps --manifest-path arceos/modules/axdma/Cargo.toml
warning: you should consider adding a `Default` implementation for `GlobalAllocator`
--> modules/axalloc/src/lib.rs:57:5
| 57 | / pub const fn new() -> Self {
58 | | Self {
59 | | balloc: SpinNoIrq::new(DefaultByteAllocator::new()),
60 | | palloc: SpinNoIrq::new(BitmapPageAllocator::new()),
61 | | }
62 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this |
55 + impl Default for GlobalAllocator {
56 + fn default() -> Self { 57 + Self::new()
58 + }
59 + }
|
# 如果不指定 --no-deps,报告行为良好
os-checker/tmp $ cargo clippy --manifest-path arceos/modules/axdma/Cargo.toml
Compiling axconfig v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axconfig)
Checking axalloc v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axalloc)
Checking axlog v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axlog)
warning: you should consider adding a `Default` implementation for `GlobalAllocator`
--> modules/axalloc/src/lib.rs:57:5
# 注意:另一个依赖项 axhal 的检查结果如期显示
warning: you should consider adding a `Default` implementation for `TaskContext`
--> modules/axhal/src/arch/x86_64/context.rs:148:5
# 第三次运行开始,带 --no-deps,那么不在显式依赖项的报告
os-checker/tmp $ cargo clippy --no-deps --manifest-path arceos/modules/axdma/Cargo.toml
Compiling axconfig v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axconfig)
Checking axalloc v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axalloc)
Checking axlog v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axlog)
Compiling axhal v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axhal)
Checking axmm v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axmm)
Checking axdma v0.1.0 (/rust/my/os-checker/tmp/arceos/modules/axdma)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.99s
os-checker/tmp $ cargo clippy --no-deps --manifest-path arceos/modules/axdma/Cargo.toml
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10 |
Already file this issue to clippy developers on zulipchat: unexpected results of clippy with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
os-checker 相关代码:https://github.com/os-checker/os-checker/blob/50faf092c08b39184e6ccd838cc328d63b7b0075/src/repo/cmd.rs#L17-L26
问题库之一:https://github.com/arceos-org/arceos/blob/6f98bc411e4c799085739ebb9ef4de28de4e7f30/modules/axdma/Cargo.toml#L19
The text was updated successfully, but these errors were encountered: