Expand description
Tidy check to enforce various stylistic guidelines on the Rust codebase.
Example checks are:
- No lines over 100 characters (in non-Rust files).
- No files with over 3000 lines (in non-Rust files).
- No tabs.
- No trailing whitespace.
- No CR characters.
- No
TODO
orXXX
directives. - No unexplained
```ignore
or```rust,ignore
doc tests.
Note that some of these rules are excluded from Rust files because we enforce rustfmt. It is preferable to be formatted rather than tidy-clean.
A number of these checks can be opted-out of with various directives of the form:
// ignore-tidy-CHECK-NAME
.
Macros§
Enums§
Constants§
- ANNOTATIONS_
TO_ 🔒IGNORE - COLS 🔒
- CONFIGURABLE_
CHECKS 🔒 - DOUBLE_
SPACE_ 🔒AFTER_ DOT - ERROR_
CODE_ 🔒COLS - Error code markdown is restricted to 80 columns because they can be displayed on the console with –example.
- GOML_
COLS 🔒 - INTERNAL_
COMPILER_ 🔒DOCS_ LINE - LETTER_
DIGIT 🔒 - LINES 🔒
- LLVM_
UNREACHABLE_ 🔒INFO - ROOT_
PROBLEMATIC_ 🔒CONSTS - UNEXPLAINED_
IGNORE_ 🔒DOCTEST_ INFO
Statics§
Functions§
- check
- contains_
ignore_ 🔒directives - contains_
problematic_ 🔒const - generate_
problematic_ 🔒strings - generate_
problems 🔒 - is_in
- is_
unexplained_ 🔒ignore - line_
is_ 🔒url - Returns
true
ifline
appears to be a line comment containing a URL, possibly with a Markdown link label in front, and nothing else. The Markdown link label, if present, may not contain whitespace. Lines of this form are allowed to be overlength, because Markdown offers no way to split a line in the middle of a URL, and the lengths of URLs to external references are beyond our control. - long_
line_ 🔒is_ ok - Returns
true
ifline
is allowed to be longer than the normal limit. - should_
ignore 🔒 - Returns
true
ifline
can be ignored. This is the case when it contains an annotation that is explicitly ignored. - skip_
markdown_ 🔒path