From b1b312923df4975055b02bdfc08e12a67fb45d86 Mon Sep 17 00:00:00 2001 From: Ashton McGlone Date: Mon, 17 Feb 2025 15:25:37 -0500 Subject: [PATCH] Add 'Code_Smells_Patterns/Reocurring_Parameter_Lists.md' --- Code_Smells_Patterns/Reocurring_Parameter_Lists.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Code_Smells_Patterns/Reocurring_Parameter_Lists.md diff --git a/Code_Smells_Patterns/Reocurring_Parameter_Lists.md b/Code_Smells_Patterns/Reocurring_Parameter_Lists.md new file mode 100644 index 0000000..213cd4b --- /dev/null +++ b/Code_Smells_Patterns/Reocurring_Parameter_Lists.md @@ -0,0 +1,14 @@ +**Reocurring Parameter lists** + +* Force: Refactoring may be considered if a certian list of parameters keeps reappearing in many methods. + +For example: +``` +function(int a, int b, string c) +function2(int a, int b, string c) +function3(int a, int b, string c) +``` + +* Solution: It may be possible to group these parameters into an object and instead pass the object around to different functions rather than passing each parameter. + +[Back to Index](./index.md) \ No newline at end of file