actix-swagger icon indicating copy to clipboard operation
actix-swagger copied to clipboard

Ignore clippy warnings in generated code

Open Pzixel opened this issue 4 years ago • 2 comments

I think it worth adding

#![allow(clippy::all, clippy::restriction, clippy::pedantic, clippy::nursery, clippy::cargo)]

to the existing #![allow(dead_code, unused_imports)] disabled warnings.

Pzixel avatar May 15 '20 16:05 Pzixel

Everyclippy::restriction, clippy::pedantic, clippy::nursery and clippy::cargo is allow by default, so there is no need to allow them explicitly.

And #![allow(clippy::all)] will suppress all clippy warnings, doesn't it?

WaffleLapkin avatar May 15 '20 17:05 WaffleLapkin

But if I have warn on the crate level I still don't want to get warnings from generated code. This is exactly my case. I have some [warn]/[deny] in main.rs and I get warnings that I cannot fix because you are not allowed to manually edit generated files: all changes will be lost anyway in the next regeneration.

doesn't it?

I'm not sure, because I've copied it from somewhere on the urlo, and they write all these categories explicitely.

Pzixel avatar May 15 '20 17:05 Pzixel