-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add Rust-code check to CI #1712
Comments
Hi @palfrey, I was working on it and got to a point where it's working for Github repositories. But there are a few things I'd like to discuss:
The image below shows the current distribution:
|
At a gut level, I'd say 50%, mostly from a "if the project is Rust plus say JS for a frontend bit, that's ok" kinda thing. That looks like it drops ~1/8th of projects? Can you provide the list of what that would drop, just so I can sanity check and figure out if there's any obvious side cases which should be in the list but fail that?
So https://github.com/rust-unofficial/awesome-rust/blob/main/src/main.rs#L28 is the code for overriding stars. The same thing could be done per-section if there's some areas that should have lower numbers. Could also add something like either of the sets in https://github.com/rust-unofficial/awesome-rust/blob/main/src/main.rs#L40 if it's individual repos that we just need to file under "it's fine, don't worry about this one" as well. We'll definitely need to do that for things like Gitlab, etc. |
The list can be found at awesome-rust codebase rust percentage, the second tab has the entire list. I got the chart wrong, this one is up to date.
Im talking about which rules should apply to https://github.com/FQAlmeida/awesome-rust/blob/3e97268655dac5ddd97979fa88386aa8ae026be1/src/main.rs#L45. In https://github.com/FQAlmeida/awesome-rust/blob/3e97268655dac5ddd97979fa88386aa8ae026be1/src/main.rs#L90, I added all the failing repos for now.
I didn't had a look at Gitlab's API, but, as long it have a similar endpoint, it should be simple. I can open a PR if you would like. |
Hey, sorry for not replying to this sooner. I'm pro a PR, can have with Gitlab API as well if you really want, but it's usage is small enough that I'm fine without. That list of overrides/failures is interesting. There's a bunch that I think either were Rust and have now been rewritten, or are from way back and just aren't Rust, and those we can drop. And then there's things like Ring that despite being a crate are almost 50% assembly, and a bunch of "this is actually Rust docs, but no/low Rust code" stuff and both of those we should keep. Thanks for all your work here! |
https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repository-languages could be used to only allow projects that are at least N% Rust (with overrides for special cases)
The text was updated successfully, but these errors were encountered: