Commit graph

32 commits

Author SHA1 Message Date
onur-ozkan
48192701e0 use "bootstrap" instead of "rustbuild" in comments and docs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-07-07 00:07:08 +03:00
onur-ozkan
80d96dffae lint-docs: apply considerable clippy suggestions
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-13 18:41:47 +03:00
Santiago Pastorino
41d4a95fca
Add "better" edition handling on lint-docs tool 2024-05-24 23:58:27 -03:00
Michael Goulet
7789874e6e Deny gen keyword in edition_2024_compat lints 2024-04-22 11:51:50 -04:00
许杰友 Jieyou Xu (Joe)
871c3e3075
Rollup merge of #123986 - ehuss:lint-renamed, r=Mark-Simulacrum
lint-docs: Add redirects for renamed lints.

This updates the lint docs to include a redirect for renamed lints to the new name. This helps ensure that links to the old name will still be valid.

Note that this currently uses a hard-coded list. As mentioned in the comment, a future enhancement may gather this information in a better way.

Unblocks #123680
2024-04-20 21:45:35 +01:00
Eric Huss
24e9a0c41b Fix docs for unstable_features lint. 2024-04-15 19:22:19 -07:00
Eric Huss
232eb59a8f lint-docs: Add redirects for renamed lints. 2024-04-15 13:01:18 -07:00
Tyler Mandry
c121a26ab9 Split refining_impl_trait lint into _reachable, _internal variants 2024-03-05 16:19:16 -08:00
Obei Sideg
a8aa6878f6 Update test for E0796 and static_mut_ref lint 2024-01-07 17:29:25 +03:00
jyn
67b5990472 Revert "Fix x test lint-docs when download-rustc is enabled"
This was not the correct fix. The problem was two-fold:
- `download-rustc` didn't respect `llvm.assertions`
- `rust-dev` was missing a bump to `download-ci-llvm-stamp`

The first is fixed in this PR and the latter was fixed a while ago. Revert this change to avoid breaking `rpath = false`.
2023-07-11 22:30:28 -05:00
jyn
abf9cbcb69 Fix x test lint-docs when download-rustc is enabled
Bootstrap was setting LD_LIBRARY_PATH for bootstrap tools in `tool_cmd`,
and rustc inherited that environment. That broke when download-rustc was
enabled; see the new comment for details.
2023-04-18 23:08:48 -05:00
Eric Huss
ab2508a71f Collect all matching messages for a lint.
Some examples may contain multiple lines which trigger the lint.
Previously it would only display the first message.
This updates it so that all matching instances of the lint are displayed.
2023-02-28 19:59:01 -08:00
Eric Huss
c6cba68c16 Add check for errant {{produces}} marker.
If a lint example has an `ignore` tag, but the lint author also includes
the {{produces}} marker, then the output will just contain the text
`{{produces}}`. This adds a check for this mistake and provides help on
how the lint docs should be written.
2023-02-28 18:21:49 -08:00
Kagami Sascha Rosylight
8ecbb7e39a fix the lint as requested 2022-10-24 21:25:30 +02:00
Aaron Kofsky
1421cffca1 Add let_underscore lint group to GROUP_DESCRIPTIONS. 2022-06-04 20:12:26 -04:00
Eric Huss
6eb41178c4 Minor tweaks to rustc book summary formatting. 2022-05-19 19:08:53 -07:00
Mark Rousskov
3b89679671 Adjust documentation for compatibility with 2021
This also adjusts the lint docs generation to accept (and ignore) an allow
attribute, rather than expecting the documentation to be immediately followed by
the lint name.
2021-09-20 22:21:43 -04:00
Mark Rousskov
c746be2219 Migrate to 2021 2021-09-20 22:21:42 -04:00
Jade
3cf820e17d rfc3052: Remove authors field from Cargo manifests
Since RFC 3052 soft deprecated the authors field anyway, hiding it from
crates.io, docs.rs, and making Cargo not add it by default, and it is
not generally up to date/useful information, we should remove it from
crates in this repo.
2021-07-29 14:56:05 -07:00
Ryan Levick
4e5b78fdcf Allow lint names to have ascii numbers 2021-07-06 20:12:55 +02:00
Ryan Levick
4193b0bb70 Add 2021 compatibility lint description 2021-04-26 15:08:55 +02:00
Eric Huss
966621563e lint-docs: Warn on missing lint when documenting. 2020-12-26 13:48:09 -08:00
Camelid
b4b66f6e24 Fix trimming of lint docs
It was removing all the indentation before.

Co-authored-by: Eric Huss <eric@huss.org>
2020-12-06 14:11:02 -08:00
Eric Huss
a90fdfc701 lint-docs: Use strip-prefix to simplify. 2020-11-29 07:57:55 -08:00
Eric Huss
228510b0ec lint-docs: Add some extra detail to the error message.
This will hopefully help users figure out what was wrong and how
to fix it.
2020-11-29 07:39:36 -08:00
Eric Huss
d2d91b42a5 lint-docs: Add --validate flag to validate lint docs separately. 2020-11-28 13:39:02 -08:00
Eric Huss
f17e6487b2 lint-docs: Move free functions into methods of LintExtractor.
This helps avoid needing to pass so many parameters around.
2020-11-28 13:38:58 -08:00
Mark Rousskov
7e24136996 Pass --target to lint docs
Otherwise, we may not have a standard library built for the native "host" target
of the rustc being run.
2020-09-16 17:25:39 -04:00
Eric Huss
32efcfca2f Include non-JSON output in error display for lint-doc failure.
Some errors, like if rustc is broken, or dylib search path is wrong,
will only display non-JSON errors. Show those, too, to make it easier to
debug a problem.
2020-09-14 14:42:37 -07:00
Eric Huss
c04973585d Support ignore for lint examples. 2020-09-13 08:48:03 -07:00
Eric Huss
ce014be0b9 Link rustdoc lint docs to the rustdoc book. 2020-09-13 08:48:03 -07:00
Eric Huss
45c1e0ae07 Auto-generate lint documentation. 2020-09-13 08:48:03 -07:00