openapi / actix-swagger

Swagger code generator for actix-web framework
https://crates.io/crates/cargo-swagg
MIT License
113 stars 8 forks source link

Ignore clippy warnings in generated code #16

Open Pzixel opened 4 years ago

Pzixel commented 4 years ago

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.

WaffleLapkin commented 4 years ago

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?

Pzixel commented 4 years ago

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.