Skip to content

no-dupe-parameters

Forbid duplicate parameters in function definitions

INFO

☑️ The predefined configuration "mslint:recommended" enables this rule.

Rule details

This rule prohibits duplicate parameter names in function declarations.

Example of incorrect code for this rule:

maniascript
Void FunctionA(
  Integer _A1,
  Integer _A1 // [!code error]
) {}
Void FunctionB(
  Integer _B1,
  Text _B1 // [!code error]
) {}
Void FunctionC(
  Integer _C1,
  Text _C2,
  Integer _C1, // [!code error]
  Text _C2 // [!code error]
) {}

Example of correct code for this rule:

maniascript
Void FunctionA(
  Integer _A1,
  Integer _A2 // [!code hl]
) {}
Void FunctionB(
  Integer _B1,
  Text _B2 // [!code hl]
) {}
Void FunctionC(
  Integer _C1,
  Text _C2,
  Integer _C3, // [!code hl]
  Text _C4 // [!code hl]
) {}

Resources