Skip to content

Add span_lint_note to the lint Context #19668

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kmcallister opened this issue Dec 9, 2014 · 7 comments
Closed

Add span_lint_note to the lint Context #19668

kmcallister opened this issue Dec 9, 2014 · 7 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@kmcallister
Copy link
Contributor

This calls span_note unless the lint level is Allow, in which case it does nothing.

@kmcallister kmcallister added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 9, 2014
@andrewyli
Copy link
Contributor

Why isn't span_lint in Context good enough?

@kmcallister
Copy link
Contributor Author

Because it prints a warning or an error, not a note.

@andrewyli
Copy link
Contributor

It seems to me that span_lint_note would mostly be comprised of code similar to/from raw_emit_lint, with only minor changes. Is that redundant or am I missing something?
Thanks in advance.

@huonw
Copy link
Member

huonw commented Dec 23, 2014

Theoretically we may want span_lint_help too.

@andrewyli
Copy link
Contributor

For all these versions of what currently exists, probably need a modification of raw_emit_lint to deal with all cases like span_lint_x.
(I'll take a stab if that's okay)

@kmcallister
Copy link
Contributor Author

It'd be great to combine them, yeah.

@nxnfufunezn
Copy link
Contributor

working on this..

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants