Warning arguments not present
test.sh:20: warning: argument 'delimiter' of command @param is not found in the argument list of hello(delimiter)
test.sh:8: warning: argument 'string' of command @param is not found in the argument list of simple_function(string, delimiter)
test.sh:8: warning: argument 'delimiter' of command @param is not found in the argument list of simple_function(string, delimiter)
Since .sh files are based on the C oxygen parser, this error seems logic, but I was wondering if we could prevent it.
Well, removing the warning is quite easy (see 13dd6712db6147747060e2775a128dca65329f9f). But (there's always a but), I understand we now have to have a type for each parameter, and I aesthetically don't like that idea.
Indeed, this is quite awful. I tested with PHP and indeed since the language is dynamically typed, and even if PHP is officially supported by doxygen, I even have warnings with this language :-/.
<?php
/** \file */
/**
* Hello world
* \brief this is a simple hello world
* \param string the string
* \param delimiter the delimiter
*/
function helloWorld($string, $delimiter) {
echo "$string, $delimiter"
}
?>
test.php:6: warning: argument 'string' of command @param is not found in the argument list of helloWorld($string, $delimiter)
test.php:6: warning: argument 'delimiter' of command @param is not found in the argument list of helloWorld($string, $delimiter)
test.php:11: warning: The following parameters of helloWorld($string, $delimiter) are not documented:
parameter '$string'
parameter '$delimiter'
The solution would be to specify an invisible type in the regex. Therefore, I tried to use the sed whitespace syntax (\s), but is isn't working. Do you have any idea?
Also, I tried to allow documentation on lines with a shift (one or several 4 tabs or none), I added this feature to the regex, but it seems this isn't taken into account. Do you have any idea about this as well?
example:
## @defgroup Colors Define a color as a variable string
## @{
## @addtogroup Colors
## @var textBlack
## @brief Define text in black
export textBlack="[30m"
[...]
## @}
The warnings go away if you do @param $string, and @param $delimiter instead.
Maybe the solution is to generate pseudo-php instead of pseudo-C. I'll dig into that.