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

Add lint to detect allow attributes without reason #8504

Merged
merged 1 commit into from
Mar 4, 2022

Conversation

xFrednet
Copy link
Member

@xFrednet xFrednet commented Mar 3, 2022

I was considering putting this lint into the pedantic group. However, that would result in countless warnings for existing projects. Having it in restriction also seems good to me 🙃 (And now I need sleep 💤 )


changelog: New lint [allow_lint_without_reason] (Requires the lint_reasons feature)

Closes: #8502

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 3, 2022
@xFrednet xFrednet force-pushed the 8502-allow-lint-without-reason branch from b403321 to 039946e Compare March 4, 2022 07:15
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.

LGTM overall. restriction sounds like the orrect lint group to me 👍

clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
clippy_lints/src/attrs.rs Outdated Show resolved Hide resolved
@xFrednet xFrednet force-pushed the 8502-allow-lint-without-reason branch from 039946e to 47a4ac3 Compare March 4, 2022 16:44
@xFrednet xFrednet force-pushed the 8502-allow-lint-without-reason branch from 47a4ac3 to ab6ffb6 Compare March 4, 2022 16:45
@xFrednet
Copy link
Member Author

xFrednet commented Mar 4, 2022

Good suggestions 👍 The lint name was also something I was thinking about. I've added your suggestions and squashed the commits 🙃

@flip1995
Copy link
Member

flip1995 commented Mar 4, 2022

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Mar 4, 2022

📌 Commit ab6ffb6 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Mar 4, 2022

⌛ Testing commit ab6ffb6 with merge 7ae527f...

bors added a commit that referenced this pull request Mar 4, 2022
…1995

Add lint to detect `allow` attributes without reason

I was considering putting this lint into the pedantic group. However, that would result in countless warnings for existing projects. Having it in restriction also seems good to me 🙃 (And now I need sleep 💤 )

---

changelog: New lint [`allow_lint_without_reason`] (Requires the `lint_reasons` feature)

Closes: #8502
@bors
Copy link
Collaborator

bors commented Mar 4, 2022

💔 Test failed - checks-action_test

@matthiaskrgr
Copy link
Member

@bors retry


Run actions/download-artifact@v1
Downloading artifact 'target' to: '/home/runner/work/rust-clippy/rust-clippy/target'
Error: The HTTP request timed out after 00:01:40.
Error: Exit code 1 returned from process: file name '/home/runner/runners/2.288.1/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.DownloadArtifact, Runner.Plugins"'.

@bors
Copy link
Collaborator

bors commented Mar 4, 2022

⌛ Testing commit ab6ffb6 with merge 48d5494...

@bors
Copy link
Collaborator

bors commented Mar 4, 2022

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

@bors bors merged commit 48d5494 into rust-lang:master Mar 4, 2022
@xFrednet xFrednet deleted the 8502-allow-lint-without-reason branch March 4, 2022 19:41
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.

Lint #[level()] attribute without lint reason (#![feature(lint_reasons)])
5 participants