rust-lang / rust-clippy

A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
https://rust-lang.github.io/rust-clippy/
Other
10.89k stars 1.45k forks source link

configurably allow `useless_vec` in tests #12725

Closed llogiq closed 2 weeks ago

llogiq commented 2 weeks ago

This adds a àllow-useless-vec-in-test configuration which, when set to true will allow the useless_vec lint in #[test] functions and code within #[cfg(test)]. It also moves a is_in_test helper to clippy_utils.


changelog: configurably allow [useless_vec] in test code

rustbot commented 2 weeks ago

r? @Jarcho

rustbot has assigned @Jarcho. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

llogiq commented 2 weeks ago

Jarcho seems to be busy recently, so perhaps r? @blyxyas

blyxyas commented 2 weeks ago

@bors r+

bors commented 2 weeks ago

:pushpin: Commit db40ab45dac590d2435367e359ff350675f9b4bc has been approved by blyxyas

It is now in the queue for this repository.

bors commented 2 weeks ago

:hourglass: Testing commit db40ab45dac590d2435367e359ff350675f9b4bc with merge 5300d45877f09541463c692a6220985945d7a664...

bors commented 2 weeks ago

:broken_heart: Test failed - checks-action_test

blyxyas commented 2 weeks ago

@bors r+

bors commented 2 weeks ago

:pushpin: Commit 87efce4fa22f51075e1fd25904f757f783eebfdc has been approved by blyxyas

It is now in the queue for this repository.

bors commented 2 weeks ago

:hourglass: Testing commit 87efce4fa22f51075e1fd25904f757f783eebfdc with merge e68fcb09734cc63ddbac7c0263a9d1b6e2549cd5...

bors commented 2 weeks ago

:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: blyxyas Pushing e68fcb09734cc63ddbac7c0263a9d1b6e2549cd5 to master...