@@ -17,7 +17,8 @@ test that makes the life of another contributor as hard as possible.
17
17
>
18
18
> To make the life of another contributor as hard as possible, one might:
19
19
>
20
- > - Only name the test after an issue, e.g. ` issue-123456.rs ` .
20
+ > - Name the test after an issue number alone without any other context, e.g.
21
+ > ` issue-123456.rs ` .
21
22
> - Have no comments at all on what the test is trying to exercise, no links to
22
23
> relevant context.
23
24
> - Include a test that is massive (that can otherwise be minimized) and
@@ -40,23 +41,28 @@ related tests.
40
41
41
42
- Name the test after what it's trying to exercise or prevent regressions of.
42
43
- Keep it concise.
43
- - Avoid including issue numbers in test names.
44
+ - Avoid using issue numbers alone as test names.
45
+ - Avoid starting the test name with ` issue-xxxxx ` prefix as it degrades
46
+ auto-completion.
44
47
45
- > ** Avoid issue numbers in test names**
48
+ > ** Avoid using only issue numbers as test names**
46
49
>
47
- > Prefer including them as links or ` #123456 ` in test comments instead.
50
+ > Prefer including them as links or ` #123456 ` in test comments instead. Or if it
51
+ > makes sense to include the issue number, also include brief keywords like
52
+ > ` macro-external-span-ice-123956.rs ` .
48
53
>
49
54
> ``` text
50
55
> tests/ui/typeck/issue-123456.rs // bad
51
- > tests/ui/typeck/issue-123456-asm-macro-external-span-ice.rs // bad
56
+ > tests/ui/typeck/issue-123456-asm-macro-external-span-ice.rs // bad (for tab completion)
57
+ > tests/ui/typeck/asm-macro-external-span-ice-123456.rs // good
52
58
> tests/ui/typeck/asm-macro-external-span-ice.rs // good
53
59
> ```
54
60
>
55
61
> `issue-123456.rs` does not tell you immediately anything about what the test
56
62
> is actually exercising meaning you need to do additional searching. Including
57
- > the issue number in the test name is really noisy for finding relevant tests
58
- > by what they're exercising (if you `ls` a test directory and get a bunch of
59
- > `issue-xxxxx` prefixes). We can link to the issue in a test comment.
63
+ > the issue number in the test name as a prefix makes tab completion less useful
64
+ > (if you `ls` a test directory and get a bunch of `issue-xxxxx` prefixes). We
65
+ > can link to the issue in a test comment.
60
66
>
61
67
> ```rs
62
68
> //! Check that `asm!` macro including nested macros that come from external
0 commit comments