Skip to content

Clarify allow/warn/deny documentation. Remove enable/disable. #6270

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

Merged

Conversation

ClashTheBunny
Copy link
Contributor

Disable and enable when not specifically explained were not clear to me
as an English language speaker, but I was able to figure it out fairly
easily due to the examples having A/W, which I assumed meant allow and
warn. I removed both words to be sure it was clear as well as
extending the note on what deny means. It now includes a statement on
exactly what each word means.

Documentation only update.

Please keep the line below
changelog: none

Disable and enable when not specifically explained were not clear to me
as an English language speaker, but I was able to figure it out fairly
easily due to the examples having A/W, which I assumed meant `allow` and
`warn`.  I removed both words to be sure it was clear as well as
extending the note on what deny means.  It now includes a statement on
exactly what each word means.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @flip1995 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 30, 2020
README.md Outdated
Comment on lines 170 to 174
Note: `allow` in this case means to "allow your code to have the lint without
warning". `deny` means "produce an error if your code has the lint". `warn`
means "produce a warning, but don't produce an error due to this lint". An
error causes clippy to exit with an error code, so is useful in scripts like
CI/CD.
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the wording here. Code cannot "have a lint". But a lint triggers for code. Also just because something is marked with warn, doesn't mean the lint will trigger.

allow means to suppress the lint for your code. With warn the lint will only emit a warning, while with deny the lint will emit an error, when triggering for your code. An error causes clippy to exit with an error code, so is useful in scripts like CI/CD.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look!

I like your reword, I was trying to figure out the right wording but couldn't come up with anything better than "having lint on a shirt" terminology. I've pushed the change!

@flip1995
Copy link
Member

flip1995 commented Nov 4, 2020

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Nov 4, 2020

📌 Commit cf2043d has been approved by flip1995

@bors
Copy link
Contributor

bors commented Nov 4, 2020

⌛ Testing commit cf2043d with merge 3a34bc0...

@bors
Copy link
Contributor

bors commented Nov 4, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 3a34bc0 to master...

@bors bors merged commit 3a34bc0 into rust-lang:master Nov 4, 2020
@ClashTheBunny
Copy link
Contributor Author

I think this should count for Hacktoberfest. Does it need a tag or anything to get counted?

@flip1995
Copy link
Member

flip1995 commented Nov 5, 2020

Nope, it should appear in your hacktoberfest profile with the "In review" label.

Note that "in review" does not mean, in review by us, but by the hacktoberfest folks.

@ClashTheBunny
Copy link
Contributor Author

Apparently it doesn't count when you do the work:

PRs must be both created and accepted during Hacktoberfest to count toward winning. PRs accepted by a maintainer after Oct. 31 won't count toward winning Hacktoberfest.

@flip1995
Copy link
Member

flip1995 commented Nov 8, 2020

Oh, sorry about that. I got the information, that it will also count if accepted later on. hacktoberfest was a bit too much for the Clippy team this year, because of unforeseeable circumstances.

@ClashTheBunny
Copy link
Contributor Author

ClashTheBunny commented Nov 8, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants