diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/missing_enforced_import_renames.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/missing_enforced_import_renames.txt b/src/tools/clippy/src/docs/missing_enforced_import_renames.txt new file mode 100644 index 000000000..8f4649bd5 --- /dev/null +++ b/src/tools/clippy/src/docs/missing_enforced_import_renames.txt @@ -0,0 +1,22 @@ +### What it does +Checks for imports that do not rename the item as specified +in the `enforce-import-renames` config option. + +### Why is this bad? +Consistency is important, if a project has defined import +renames they should be followed. More practically, some item names are too +vague outside of their defining scope this can enforce a more meaningful naming. + +### Example +An example clippy.toml configuration: +``` +enforced-import-renames = [ { path = "serde_json::Value", rename = "JsonValue" }] +``` + +``` +use serde_json::Value; +``` +Use instead: +``` +use serde_json::Value as JsonValue; +```
\ No newline at end of file |