-
Notifications
You must be signed in to change notification settings - Fork 56
Code style improvements + optional CI job (clippy, rustfmt, rustdoc) #92
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
Conversation
@@ -11,11 +11,10 @@ use core::marker::PhantomData; | |||
pub const MULTIBOOT2_BOOTLOADER_MAGIC: u32 = 0x36d76289; | |||
|
|||
/// Possible types of a Tag in the Multiboot2 Information Structure (MBI), therefore the value | |||
/// of the the `typ` field in [`Tag`]. The names and values are taken from the example C code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag
is private, therefore rustdoc failure
76acf68
to
e7a4910
Compare
Hmm, I've tried having these sorts of checks in CI with communal projects before, and I think I'm generally against it. It makes merging every PR, especially from new contributors, a bit of an uphill battle that doesn't leave a good impression for potential contributors. I think with a relatively small project, doing a clippy PR every so often, as well as manually asking for really bad formatting to be run through rustfmt before you merge is good enough. Open to alternative views though.
Ah no, my mistake. Afaik, Travis CI is basically dead (it stopped reporting status updates for this repo ages ago). I fixed that by moving us oven to Actions, but must've forgotten to delete the Travis files. Feel free to remove them :) |
Hm. On the one hand I can understand this. On the otherhand, I'm certain that contributors of Multboot2, which is not a super basic domain but deep into OS development, will also not be total Rust newbees. Furthermore, it's a good opportunity for them to learn to use Any other opinion? @Caduser2020 @phil-opp |
Any update here @Caduser2020 @phil-opp @IsaacWoods ? |
I stand by my view that this has more disadvantages than advantages, and that CI failures for slight differences in code style are generally unhelpful (this is especially bad in OSdev when lots of people are a few nightlies behind, and so So my vote is to close, but I'm also not going to make this a hill to die on, so if you feel particularly strongly, you can merge. |
Theoretically, we could use a "rust-toolchain.toml" to prevent that :) But I do not insist on the CI requirement. I like it for private projects but will remove it here. Will keep the formatting and style improvements, tho. After that I can finally start with the |
First of all, I'm not maintaining the I don't think that it's a good idea to do add My personal preference is to keep warnings as warnings and use e.g. https://github.com/actions-rs/cargo to show the warnings in the "Files Changed" tab on GitHub. This way, the maintainers can decide whether the warning should be fixed or not, and it doesn't affect the mergeability of newcomer PRs. Enforcing rustfmt is ok in my opinion, but I agree with @IsaacWoods that doing it on a crate that targets both stable and nightly can lead to problems. If you decide to add such a check, I would again recommend to create a separate CI job for it, which is not required to pass. This way, formatting problems don't block merging of newcomer PRs (they should still be fixed in a follow-up PR though). |
I agree, let's do it that way :) |
I agree with @IsaacWoods for this. My build of rust is often a few days behind and rustfmt would become out of sync. I am okay with fixes for these warnings, but breaking CI is not worth it. Vote to close. |
e7a4910
to
198a0c3
Compare
198a0c3
to
b2aa888
Compare
This commit - introduces sensible style checks as optional CI tasks, - removes Travis CI - applies a few code style fixes
b2aa888
to
70d3a60
Compare
After all, this commit/PR
The new CI job should be optional by default, because I think one has to manually mark them as required for PRs. |
#![deny(rustdoc::all)]
works since stable 1.52.0)To improve and enforce code quality.
I'm not sure if we still use Travis CI.
What's your opinion on this @Caduser2020 @IsaacWoods ?