Skip to content

Missing config #10248

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
merged 15 commits into from
Jan 30, 2023
Merged

Missing config #10248

merged 15 commits into from
Jan 30, 2023

Conversation

koka831
Copy link
Contributor

@koka831 koka831 commented Jan 28, 2023

This PR addresses https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Some.20lints.20miss.20its.20config/near/318460000.

changelog: Documentation: Made sure that lint configurations on Clippy's lint list are all up to date
#10248

r? @xFrednet


I have tried to create a prototype, but have not yet found a good way to implement it.
So I would like to put it aside for now and try again after addressing other issues so that I can understand how clippy works better:)

COLLAPSIBLE_STR_REPLACE uses msrvs::PATTERN_TRAIT_CHAR_ARRAY
SEEK_FROM_CURRENT uses msrvs::SEEK_FROM_CURRENT
SEEK_REWIND uses msrvs::SEEK_REWIND
UNNECESSARY_LAZY_EVALUATIONS uses msrvs::BOOL_THEN_SOME for `then` to
`then_some`
TRANSMUTE_PTR_TO_REF uses msrvs::POINTER_CAST
ALMOST_COMPLETE_RANGE uses msrvs::RANGE_INCLUSIVE
NEEDLESS_BORROW uses msrvs::ARRAY_INTO_ITERATOR
DERIVABLE_IMPLS uses msrvs::DEFAULT_ENUM_ATTRIBUTE
MANUAL_IS_ASCII_CHECK uses msrvs::IS_ASCII_DIGIT and msrvs::IS_ASCII_DIGIT_CONST
MANUAL_REM_EUCLID uses msrvs::REM_EUCLID
MANUAL_RETAIN uses
- msrvs::STRING_RETAIN
- msrvs::BTREE_SET_RETAIN
- msrvs::BTREE_MAP_RETAIN
- msrvs::HASH_SET_RETAIN
- msrvs::HASH_MAP_RETAIN
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 28, 2023
@xFrednet
Copy link
Member

Looks good to me, thank you for updating the documentation!

@bors r+


I skimmed over the prototype, and like the idea of having a static instance to access the configuration. We could maybe think of forcing the user to specify a lint, to access a config struct, something like:

fn config(lint: &Lint) -> &Config {
	// The typical static magic
}

Then we could have an internal lint detecting access to that method. This is just a quick thought, without testing anything. If you're stuck somewhere or would just get some more information, feel free to ping me :)

@bors
Copy link
Contributor

bors commented Jan 30, 2023

📌 Commit f576a97 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 30, 2023

⌛ Testing commit f576a97 with merge 0dc1df2...

bors added a commit that referenced this pull request Jan 30, 2023
Missing config

This PR addresses https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Some.20lints.20miss.20its.20config/near/318460000.

changelog: Documentation: Made sure that lint configurations on Clippy's lint list are all up to date
[#10248](#10248)
<!-- changelog_checked -->

r? `@xFrednet`

---

I have tried to create [a prototype](koka831#1), but have not yet found a good way to implement it.
So I would like to put it aside for now and try again after addressing other issues so that I can understand how clippy works better:)
@koka831
Copy link
Contributor Author

koka831 commented Jan 30, 2023

@xFrednet Thank you for quick review:)
I've run cargo collect-metadata and fixed the last commit, which was partially updated, with this commit.

Could you review it again please?


we could have an internal lint detecting access to that method

Yes, that's what I've seeking. I actually could do this dynamically, but I'm wondering how could it be statically.

@xFrednet
Copy link
Member

Yes, that's what I've seeking. I actually could do this dynamically, but I'm wondering how could it be statically.

What do you consider dynamic / static in this regard? Fetching the config would be dynamic, but the lint would analyze the static expression 🤔


The changes still look good!

@bors r+

@bors
Copy link
Contributor

bors commented Jan 30, 2023

📌 Commit a9e6b12 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jan 30, 2023

⌛ Testing commit a9e6b12 with merge 8fb0041...

@bors
Copy link
Contributor

bors commented Jan 30, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 8fb0041 to master...

@bors bors merged commit 8fb0041 into rust-lang:master Jan 30, 2023
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