Docker

Docker

Made by DeepSource

Possible parameter declaration detected DOK-SC1065

Anti-pattern
Major

Use function_name() and refer to passed parameters as $1, $2 etc. Shell script functions behave just like scripts and other commands: - They always take 0 to N parameters, referred to by $1, $2 etc. They cannot declare parameters by name. - They are executed using name arg1 arg2, and not with parentheses as C-like languages.

Bad Practice

foo(input) {
  echo "$input"
}
foo("hello world");

Recommended

foo() {
  echo "$1"
}
foo "hello world"