Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning arguments not present #10

Open
wget opened this issue Mar 20, 2017 · 4 comments
Open

Warning arguments not present #10

wget opened this issue Mar 20, 2017 · 4 comments

Comments

@wget
Copy link

wget commented Mar 20, 2017

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.

@Anvil
Copy link
Owner

Anvil commented Mar 21, 2017

Well, removing the warning is quite easy (see 13dd671). 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.

@wget
Copy link
Author

wget commented Mar 22, 2017

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"

[...]

## @}

@Anvil
Copy link
Owner

Anvil commented Mar 23, 2017

The warnings go away if you do @param $string, and @param $delimiter instead.

@Anvil
Copy link
Owner

Anvil commented Mar 23, 2017

Maybe the solution is to generate pseudo-php instead of pseudo-C. I'll dig into that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants