diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/too_many_arguments.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/too_many_arguments.txt b/src/tools/clippy/src/docs/too_many_arguments.txt new file mode 100644 index 000000000..4669f9f82 --- /dev/null +++ b/src/tools/clippy/src/docs/too_many_arguments.txt @@ -0,0 +1,14 @@ +### What it does +Checks for functions with too many parameters. + +### Why is this bad? +Functions with lots of parameters are considered bad +style and reduce readability (“what does the 5th parameter mean?”). Consider +grouping some parameters into a new type. + +### Example +``` +fn foo(x: u32, y: u32, name: &str, c: Color, w: f32, h: f32, a: f32, b: f32) { + // .. +} +```
\ No newline at end of file |