cs431 icon indicating copy to clipboard operation
cs431 copied to clipboard

[Question] Clippy "errors" in submission

Open thekioskman opened this issue 11 months ago • 3 comments

From my understanding - we are meant to fix clippy "errors" (warnings) for our code to to accepted into gg, however some of the errors are pretty restrictive. image

For instance this is a warning on my local, but on the server it gives and error

thekioskman avatar Mar 19 '24 14:03 thekioskman

I don't think it's warning on your local, since the #[deny(warnings)] is in src/lib.rs, which means it's converted to error.

Just do what the lints says you to do, use a type definition.

m-spitfire avatar Mar 19 '24 14:03 m-spitfire

Instead of disabling clippy, you can just follow the instructions by the clippy as @m-spitfire said. In most cases, you can easily modify the code with little effort so that it passes clippy. By doing so, you can write a better Rust code with reduced possibility of mistakes.

For this reason, we enforce everyone to submit a solution that passes the clippy. Related: https://github.com/kaist-cp/cs431/issues/606#issuecomment-1235141296 https://github.com/kaist-cp/cs431/issues/637#issuecomment-1254468805

kingdoctor123 avatar Mar 19 '24 15:03 kingdoctor123

Please don't post images.

We also ask to fix clippy explicity, as seen on the last line on your image:

'Please fix the issues from `cargo +nightly clippy -- -D warnings` first.'

BTW, the model solution uses a simpler type that does not face such errors.

Lee-Janggun avatar Mar 20 '24 01:03 Lee-Janggun