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 missing tests for configuration options #11560

Merged
merged 2 commits into from
Sep 24, 2023
Merged

Conversation

y21
Copy link
Member

@y21 y21 commented Sep 24, 2023

I noticed that a lot of lints didn't have test(s) for their configuration. This leads to issues like #11481 where the lint just does nothing with it.

This PR adds tests for almost1 all of the lints with a configuration that didn't have a test in ui-toml.
The tests that I wrote here are usually two cases: one for where it's right above or under the limit set by the config where it shouldn't lint and another one for right above where it should.

changelog: none

Footnotes

  1. allow-one-hash-in-raw-strings is ignored by needless_raw_string_hashes

@rustbot
Copy link
Collaborator

rustbot commented Sep 24, 2023

r? @Alexendoo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 24, 2023
@Alexendoo
Copy link
Member

Nice, thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 24, 2023

📌 Commit 6ce61d5 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 24, 2023

⌛ Testing commit 6ce61d5 with merge 89d695a...

bors added a commit that referenced this pull request Sep 24, 2023
Add missing tests for configuration options

I noticed that a lot of lints didn't have test(s) for their configuration. This leads to issues like #11481 where the lint just does nothing with it.

This PR adds tests for *almost*[^1] all of the lints with a configuration that didn't have a test in ui-toml.
The tests that I wrote here are usually two cases: one for where it's right above or under the limit set by the config where it shouldn't lint and another one for right above where it should.

changelog: none

[^1]: allow-one-hash-in-raw-strings is ignored by needless_raw_string_hashes
@bors
Copy link
Contributor

bors commented Sep 24, 2023

💔 Test failed - checks-action_test

@y21
Copy link
Member Author

y21 commented Sep 24, 2023

Right, usize can be 32 bits, looks like that's why CI is failing for i686 😅 . Will change the test to use some smaller number

@Alexendoo
Copy link
Member

@bors retry

@Alexendoo
Copy link
Member

@bors ping

@bors
Copy link
Contributor

bors commented Sep 24, 2023

😪 I'm awake I'm awake

@Alexendoo
Copy link
Member

@bors retry

@Alexendoo
Copy link
Member

🤔

@bors r+

@bors
Copy link
Contributor

bors commented Sep 24, 2023

📌 Commit 6e80db9 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 24, 2023

⌛ Testing commit 6e80db9 with merge 94fc431...

@bors
Copy link
Contributor

bors commented Sep 24, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 94fc431 to master...

@bors bors merged commit 94fc431 into rust-lang:master Sep 24, 2023
4 checks passed
bors added a commit that referenced this pull request Sep 26, 2023
Test that each config value exists in a test clippy.toml

Inspired by #11560, adds a test that each config option exists in some form in a `clippy.toml` in `tests/` (currently some are in `ui-toml`, some in `ui-cargo`)

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