Crate tidy

Source
Expand description

Library used by tidy and other tools.

This library contains the tidy lints and exposes it to be used by tools.

Modules§

alphabetical
Checks that a list of items is in alphabetical order
bins
Tidy check to ensure that there are no binaries checked into the source tree by accident.
debug_artifacts
Tidy check to prevent creation of unnecessary debug artifacts while running tests.
deps
Checks the licenses of third-party dependencies.
edition
Tidy check to ensure that crate edition is ‘2021’ or ‘2024’.
error_codes
Tidy check to ensure error codes are properly documented and tested.
ext_tool_checks
Optional checks for file types other than Rust source
extdeps
Check for external package sources. Allow only vendorable packages.
features
Tidy check to ensure that unstable features are all in order.
fluent_alphabetical
Checks that all Flunt files have messages in alphabetical order
fluent_period
Checks that no Fluent messages or attributes end in periods (except ellipses)
fluent_used 🔒
Checks that all Fluent messages appear at least twice
iter_header 🔒
known_bug
Tidy check to ensure that tests inside ‘tests/crashes’ have a ‘@known-bug’ directive.
mir_opt_tests
Tidy check to ensure that mir opt directories do not have stale files or dashes in file names
pal
Tidy check to enforce rules about platform-specific code in std.
run_make_tests
Tidy check to ensure that no new Makefiles are added under tests/run-make/.
rustdoc_css_themes
Tidy check to make sure light and dark themes are synchronized between JS-controlled rustdoc.css and noscript.css
rustdoc_gui_tests
Tidy check to ensure that rustdoc GUI tests start with a small description.
rustdoc_templates
Tidy check to ensure that rustdoc templates didn’t forget a {# #} to strip extra whitespace characters.
style
Tidy check to enforce various stylistic guidelines on the Rust codebase.
target_policy
Tests for target tier policy compliance.
target_specific_tests
Tidy check to ensure that all target specific tests (those that require a --target flag) also require the pre-requisite LLVM components to run.
tests_placement
tests_revision_unpaired_stdout_stderr
Checks that there are no unpaired .stderr or .stdout for a test with and without revisions.
ui_tests
Tidy check to ensure below in UI test directories:
unit_tests
Tidy check to ensure #[test] and #[bench] are not used directly inside core.
unknown_revision
Checks that test revision names appearing in header directives and error annotations have actually been declared in revisions.
unstable_book
walk
x_version

Macros§

static_regex 🔒
t
A helper macro to unwrap a result except also print out details like:
tidy_error 🔒
tidy_error_ext 🔒

Functions§

tidy_error 🔒