Skip to content
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

Non-clippy lints #4

Closed
emilk opened this issue Jul 8, 2022 · 3 comments
Closed

Non-clippy lints #4

emilk opened this issue Jul 8, 2022 · 3 comments

Comments

@emilk
Copy link

emilk commented Jul 8, 2022

Thanks for cargo cranky!

There are lints outside of clippy that I often enable, for instance:

    "-Dunsafe_code",
    "-Wfuture_incompatible",
    "-Wnonstandard_style",
    "-Wrust_2018_idioms",
    "-Wrustdoc::missing_crate_level_docs",
    "-Wsemicolon_in_expressions_from_macros",
    "-Wtrivial_casts",
    "-Wtrivial_numeric_casts",
    "-Wunused_extern_crates",
    "-Wunused_import_braces",

It would be wonderful if Cranky could handle these non-clippy lints as well, as then it would be a very good solution to rust-lang/cargo#5034


Currently I enable clippy and non-clippy lints in .cargo/config.toml (https://github.com/emilk/egui/blob/e76c919c7e70c208c9a6209b9fe3369e7b6db99d/.cargo/config.toml) but it is a bit of a hack and has some problems (emilk/egui#1439).

@ericseppanen
Copy link
Owner

I agree, this should be supported. I'm not sure why I didn't think of this use-case before; I guess I was just over-focused on clippy lints.

I suppose the right thing is to require clippy lints to be specified with their full name, i.e. clippy::cast_lossless rather than just cast_lossless. I was probably wrong to take this shortcut originally.

@ericseppanen
Copy link
Owner

This should work as of cargo-clippy 0.3.0. Please let me know if it works for your use case!

@emilk
Copy link
Author

emilk commented Jul 11, 2022

Works like a charm, thanks! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants