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

Lint for Debug formatting in Display implementations #1713

Open
clarfonthey opened this issue May 2, 2017 · 3 comments
Open

Lint for Debug formatting in Display implementations #1713

clarfonthey opened this issue May 2, 2017 · 3 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy L-style Lint: Belongs in the style lint group T-middle Type: Probably requires verifiying types

Comments

@clarfonthey
Copy link
Contributor

This is similar to use_debug but should be a warn by default.

@oli-obk oli-obk added L-style Lint: Belongs in the style lint group good-first-issue These issues are a good way to get started with Clippy C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages T-middle Type: Probably requires verifiying types labels May 2, 2017
@cgm616
Copy link
Contributor

cgm616 commented Oct 17, 2020

I think this already exists! Unless I'm misunderstanding the lints tested by tests/ui/print.rs and tests/ui/print.stderr.

@clarfonthey
Copy link
Contributor Author

Potentially. This was filed 3 years ago and it's entirely possible that this was implemented and someone didn't notice to close this ticket.

If you can confirm that this already exists we can definitely close this.

@ebroto
Copy link
Member

ebroto commented Oct 17, 2020

@cgm616 that test is for use_debug which is allow-by-default and lints on any use of debug formatting.

The suggested lint would trigger only in Display impls and would be warn-by-default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy L-style Lint: Belongs in the style lint group T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

6 participants