Commit graph

24 commits

Author SHA1 Message Date
Jason Newcomb
4c44b4e3c8 Remove is_test_module_or_function and use is_in_test instead. 2024-07-05 02:17:24 -04:00
koka
fab90003b8
Do not lint when imported item contains underscore 2023-09-26 12:58:48 +09:00
Oli Scherer
3d88fae050 Update ui test crate 2023-08-11 14:02:28 +00:00
Alex Macleod
2811effe34 Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
Oli Scherer
5bd97ac17a Update tests 2023-06-26 14:13:07 +00:00
Charalampos Mitrodimas
288312463e [wildcard_imports] Modules that contain prelude are also allowed
This commit fixes #10846 by checking if the path segment contains the
word "prelude".

Signed-off-by: Charalampos Mitrodimas <charmitro@gmail.com>
2023-05-30 21:29:04 +03:00
Oli Scherer
def1705a27 Update to a compiletest-rs version that requires //@ for commands 2023-04-20 14:44:03 +00:00
chansuke
033f1ec797 Add 2018/2021 edition tests for wildcard_imports 2022-12-17 20:26:41 +09:00
bors
0930ac91b9 Fix typos
changelog: none
2022-07-13 14:48:32 +00:00
Jason Newcomb
48bcc1d95f Move let_unit_value back into style 2022-04-14 21:33:32 -04:00
Andre Bogus
a4ede72b3d update most tests to 2021 edition 2021-10-30 14:50:53 +02:00
Andre Bogus
86811e9b1b make test module detection more strict 2021-10-07 00:14:06 +02:00
Hirochika Matsumoto
c7445d7f2c Pluralize lint name 2020-11-18 01:28:37 +09:00
Hirochika Matsumoto
30632fb8e6 Allow this lint on lint tests 2020-11-18 01:28:37 +09:00
Christian Stefanescu
5b07b9ed61 Widen understanding of prelude import
Prelude imports are exempt from wildcard import warnings. Until now only
imports of the form

```
use ...::prelude::*;
```

were considered. This change makes it so that the segment `prelude` can
show up anywhere, for instance:

```
use ...::prelude::v1::*;
```

Fixes #5917
2020-08-22 14:22:02 +02:00
Glenn Hope
4db6abcd50 Remove check for Fn, reflect this in test cases, make test cases more robust/explicit 2020-05-09 11:09:38 -07:00
Glenn Hope
ad92486d52 Add check for "test" in parent name. Include flag for disabling wildcard import exceptions 2020-05-09 11:09:38 -07:00
Glenn Hope
56f4e1c3a8 Check if the parent module name contains "test" 2020-05-09 11:09:38 -07:00
Glenn Hope
0c14ea8ed7 Allow 'use super::*;' imports 2020-05-09 11:09:38 -07:00
Matthias Krüger
b86e8434df move redundant_pub_crate to nursery
cc #5369
2020-03-25 18:14:11 +01:00
Tim Robinson
870b9e8139 nursery group -> style 2020-03-23 16:45:31 +00:00
flip1995
4dd2252b17
Fix suggestion for weird formattings 2020-02-21 11:14:19 +01:00
flip1995
b67764d5cb
Add test for prelude import 2020-02-21 11:14:18 +01:00
flip1995
8a572a540a
Add tests for wildcard_imports lint 2020-02-21 11:02:25 +01:00