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

Rust API Guidelines: Debug representation is never empty #1796

Open
mcarton opened this issue May 27, 2017 · 5 comments
Open

Rust API Guidelines: Debug representation is never empty #1796

mcarton opened this issue May 27, 2017 · 5 comments
Labels
A-lint Area: New lints good-first-issue These issues are a good way to get started with Clippy L-correctness Lint: Belongs in the correctness lint group L-guidelines Lint: Related to the Rust API Guidelines T-middle Type: Probably requires verifiying types

Comments

@mcarton
Copy link
Member

mcarton commented May 27, 2017

As per Debug representation is never empty.
I wonder if someone really did that for it to get into those guidelines 😮

@mcarton mcarton added L-correctness Lint: Belongs in the correctness lint group good-first-issue These issues are a good way to get started with Clippy A-lint Area: New lints T-middle Type: Probably requires verifiying types labels May 27, 2017
@mcarton mcarton changed the title Rust API Guideline: Debug representation is never empty Rust API Guidelines: Debug representation is never empty May 27, 2017
@dtolnay
Copy link
Member

dtolnay commented May 28, 2017

Yes. bitflags/bitflags#64

@mcarton mcarton added the L-guidelines Lint: Related to the Rust API Guidelines label May 28, 2017
@DylanVener
Copy link

I'm going to take a crack at it

@oli-obk
Copy link
Contributor

oli-obk commented Jul 25, 2017

Great! It's all yours

@DylanVener
Copy link

@Manishearth
Question: Is it preferred for a lint to be implemented in its own file, or for it to be added onto another lint source file which does similar checks?

For my particular case, while reading through lints to get an idea of how to write them, I found derive.rs which already contains a couple lints for derivations. Should I just add this new lint to that file, or create a separate "empty_debug" lint?

Thanks!

@Manishearth
Copy link
Member

If you can find such a file, please add it to that file, otherwise feel free to create a new file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints good-first-issue These issues are a good way to get started with Clippy L-correctness Lint: Belongs in the correctness lint group L-guidelines Lint: Related to the Rust API Guidelines T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

6 participants