If you use the @file statement to provide a description for your file in a header, it gets applied as a duplicate block to whichever element comes first in the file.
Example code:
/**
* @file Example file.
*/
/**
* Example class.
*/
class Example {
/**
* Example function.
*/
a() {
}
};
Here, the @file block should effectively be ignored, however documentation currently applies it to the following item, so in this case the Example class is duplicated.
I think if a docblock contains @file it should be ignored, or at least attached to the file and not to whatever element follows the block.
Here is the output of the above code, with the duplicate Example class:
### Table of Contents
- [Example][1]
- [a][2]
- [Example][3]
- [a][4]
## Example
Example file.
### a
Example function.
## Example
Example class.
### a
Example function.
[1]: #example
[2]: #a
[3]: #example-1
[4]: #a-1
If you use the
@file
statement to provide a description for your file in a header, it gets applied as a duplicate block to whichever element comes first in the file.Example code:
Here, the
@file
block should effectively be ignored, howeverdocumentation
currently applies it to the following item, so in this case theExample
class is duplicated.I think if a docblock contains
@file
it should be ignored, or at least attached to the file and not to whatever element follows the block.Here is the output of the above code, with the duplicate
Example
class:Running 8.1.2 via CLI.