Closed pzmarzly closed 5 years ago
@pzmarzly : Thanks for putting this analysis. I just looked at stale-rs
, pretty cool idea! I have never heard of warnalyzer
. Do you have any idea why won't it work for Offst? Maybe we can file it as an issue there?
About the stale files you mentioned, you can remove everything besides stverify.rs, which is an actual binary. I wonder why it was detected as unused, but stctrl.rs wasn't.
EDIT: I know why. Because stctrl/Cargo.toml contains:
[lib]
name = "stctrl"
path = "src/lib.rs"
[[bin]]
name = "stctrl"
path = "src/bin/stctrl.rs"
But stverify.rs is not included as a binary. Could you add it? About the rest of the stuff: It's sad to see them go, but we are using git, so they will always be here with us somewhere (:
warnalyzer
does not support projects with multiple targets (binaries) or tests. I saw it announcement about a week ago on Reddit, it's a new project, so it needs time.
I pushed into #215 , as some changes were already done there (freeze_guard_legacy.rs
).
After stumbling upon unlinked file during development in #215 , I created a script to find other unlinked files. Here are the results for current master:
freeze_guard_legacy.rs
will be removed once #215 is merged. Please decide what to do with other files. I think it would be nice to have similar analysis for unused functions, but existing utilities (like warnalyzer) are not ready for codebases as large as offst yet.