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

Clean up span_lint in methods/mod.rs #5084

Merged
merged 3 commits into from
Jan 26, 2020

Conversation

JohnTitor
Copy link
Member

Uses span_help_and_lint instead of span_lint and span_lint_and_sugg instead of span_lint_and_then.

changelog: none

@JohnTitor
Copy link
Member Author

JohnTitor commented Jan 24, 2020

BTW: span_help_and_lint and span_lint_and_sugg make me confused (their orders are different), could we rename them or is there any intension I miss?

@flip1995
Copy link
Member

(their orders are different), could we rename

I think span_lint_and_* is the better name for both, since it matches the argument order of the functions. I'd be good with renaming them.

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I wanted to do this every time I review something in the methods module.

lint/sugg/hint/... messages in rust always start lowercase and don't have punctuation at the end

clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
@JohnTitor
Copy link
Member Author

Applied all your suggestions (applied them on my local since some suggestions break wording, GitHub's review suggestion isn't suitable for multiple lines, and need to update stderrs).

I think span_lint_and_* is the better name for both

I think so too, I'll do it in another PR.

@flip1995
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2020

📌 Commit 4b133f2 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Jan 26, 2020

⌛ Testing commit 4b133f2 with merge 4f65bec...

bors added a commit that referenced this pull request Jan 26, 2020
Clean up `span_lint` in `methods/mod.rs`

Uses `span_help_and_lint` instead of `span_lint` and `span_lint_and_sugg` instead of `span_lint_and_then`.

changelog: none
@bors
Copy link
Contributor

bors commented Jan 26, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 4f65bec to master...

@bors bors merged commit 4b133f2 into rust-lang:master Jan 26, 2020
@JohnTitor JohnTitor deleted the clean-up-span-lint branch January 27, 2020 00:20
bors added a commit that referenced this pull request Jan 27, 2020
Rename `span_{help, note}_and_lint` to `span_lint_and_*`

`span_*_and_lint` and `span_lint_and_*` make us confused. The order should be the same.

[context](#5084 (comment))

changelog: none
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

Successfully merging this pull request may close these issues.

3 participants