Anvil / bash-doxygen

A doxygen filter for bash scripts
Do What The F*ck You Want To Public License
91 stars 24 forks source link

Not working if the .sh file does not have a @file statement #9

Open wget opened 7 years ago

wget commented 7 years ago

I followed your instructions properly, but had a hard time figuring out this issue. Is this a regular behavior?

If not, I'm eager to publish a PR.

Also, I have good practise rules to add wrt. \return and \retval usage in bash.

Anvil commented 7 years ago

Hello

I thought it was a doxygen mandatory thingy. The bash-doxygen filter does nothing with @file itself. It's just passed to doxygen. So I'm not sure if it's "regular", or not. But I can add a note in the README.md about that if needed.

About \return and \retval: not sure what you mean... Could you elaborate on that ?

wget commented 7 years ago

Thanks for your answer. As soon we have finish our discussion here and as soon the the other issues I reported are closed, I'll rewrite the README to integrate all the elements we have discussed. :)

What I meant with \return and \retval is the fact this is better to return the state of the function if an error has occurred or not with number values (in this case, we use \retval Doxygen syntax) and return the value itself using a global variable which is reset in each function with \retval.

Here is an example in order to help you understanding what I meant: screenshot_20170322_170541

(notice the use of retvaland return bash statements. These have the names in reverse order compared to Doxygen terms (retval are numbers with Doxygen, while in my own Bash terminology, this is the value of retval I meant, and return is the value of the returned variable in the terms of Doxygen, but this is the value of my own retvalvariable in my own terminology. Don't know if I'm clear :) )

screenshot_20170322_170245