Rust Report Card - Get a badge for your Rust open source project

A web application that generates a report on the quality of an open-source Rust project. This project inspired and based on the Go report card. It uses rust-clippy measures. To get a report on your own project, try using the https://rust-reportcard.xuri.me.

1 Like

I tried putting in Tokio's repo, but nothing seemed to happen.

Maybe need some time on first checkout the code. The report is here https://rust-reportcard.xuri.me/report/github.com/tokio-rs/tokio

It seems rather one-sided. My Avocado crate just got a rating of "E — urgent improvement needed", seemingly based solely on the number of Clippy lints. That's one of the crates I put the most effort into — however, its somewhat old now (it's superseded by other things I'm producing as part of my research).

In particular, it doesn't seem like there are any metrics with respect to:

  • the README and the quality and quantity of documentation in general;
  • the usefulness/ergonomics/conventions of the API;
  • including perhaps the formatting of the code, keeping open-source contributors in mind;
  • the popularity of the crate (total or daily downloads, number of dependent crates);
  • the safety and security aspects of the code — whether it uses unsafe and how much, whether it declares #![forbid(unsafe)], whether cargo-audit reports any problems;
  • the accountability of the architecture, e.g. the number of immediate and transitive dependencies and/or the results of cargo bloat.

Including some of these would be useful and informative, because Clippy, while helpful, is somewhat opinionated and does not have any knowledge about the aforementioned dimensions of overall quality.

1 Like

It doesn't even seem like it was able to compile Tokio at all. Tokio uses clippy in CI, so there are no clippy warnings on Tokio if you compile it correctly.

Tokio is a bit of a beast, poor thing needed a warmup with some smaller crates before taking on the final boss :stuck_out_tongue:

Hope you can come back with a new and improved version xuri, I like the concept and the style. I think this is a great foundation to build on. Curious why tokio CI/CD and this disagree on clippy warnings. Are any optional lints turned on/off?

No, we use the standard clippy config. My guess is that it has something to do with feature flags.

The first two projects of mine I tried both get an "F". Hmmm, not sure that's incentive to add this badge to my projects! :slight_smile:

Looking at them more closely, it looks like they get "F" exclusive for clippy, and these clippy warnings fail to consider the MSRV of my projects, which I take seriously, and can't take clippy's advise until the MSRV is raised, or in the case of my build.rs where I'm checking the rust version for both MSRV and selective use of rustc/libstd features, it intentionally is written in a way to compile on rustc 1.0.0 (or as near as possible).

1 Like

Should probably make another topic of this (title: "clippy, build.rs and MSRV"), but I remembered there is a reason I haven't been able to even disable, clippy lints in these build.rs cases:

None of these syntaxi have been stable long enough to work for this case:

#![allow(clippy)]
#![allow(clippy::all)]
#![feature(custom_inner_attributes)] // hmmm
#![clippy::msrv = "1.0.0"]

Thanks for your feedback, the previous grade calculation rules are inappropriate, I have updated them and refreshed the report.

1 Like

Thanks! For my part, and as positive example of what the tool helps reveal, I added the previously missing LICENSE-MIT/APACHE files to the blocking-permit tree (2nd link above).