After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624829 - \endcond errors not limited to a single file
\endcond errors not limited to a single file
Status: VERIFIED FIXED
Product: doxygen
Classification: Other
Component: general
1.7.1
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2010-07-20 13:22 UTC by Clemens
Modified: 2010-10-12 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
small example to demonstrate the issue. (3.29 KB, application/zip)
2010-07-20 13:22 UTC, Clemens
Details

Description Clemens 2010-07-20 13:22:30 UTC
Created attachment 166203 [details]
small example to demonstrate the issue.

Each \cond command normally needs a closing \endcond. In my opinion the 
end of a file should automatically close all conditional blocks in case 
someone forgot the \endcond. Or in other words the scope of a 
\cond+\endcond block shall not span outside a file. Currently such block 
seems to continue also over a file end, which is useless in my opinion 
because you cannot control the order doxygen parses the files.

Here is some background:
A colleague forgot the \endcond in two or three files. This caused some 
confusion: Documentation of some items in some other files was missing. 
It took me some time to find out that the missing \endcond commands were 
the reason. Those conditional were false, so doxygen ignored everything 
from the \cond on. But because \endcond was missing doxygen ignored also 
other things in other files which I do not want to be ignored.

P.S.
I know that doxygen warns if \endcond is missing. But it is easy to 
oversee such warning.

P.P.S.
Dimitri confirmes that there sould be a protection in convertCppComments in commentcnv.l. But I found out that it does not work all the time. The bug seems to depend on the order of input file handling. I will attached a small example to demonstrate the issue. Please watch for the order of input files:

	# This input line triggers the defect:
	INPUT = cond.c testdef.c
	
	# This INPUT line does not trigger the defect and 
	# everything looks like it should:
	#INPUT = testdef.c cond.c
Comment 1 Dimitri van Heesch 2010-07-20 19:29:29 UTC
I overlooked that the preprocessor is run before the part that handles the \cond..\endcond. Indeed the preprocessor does not nicely cleanup in case of a missing \endcond. Should be fixed in the next subversion update.
Comment 2 Dimitri van Heesch 2010-10-09 08:19:28 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.2. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 3 Clemens 2010-10-12 12:13:21 UTC
I can confirm that the demonstration sample now works properly with Doxygen 1.7.2. Well done! 

After running the example with Doxygen 1.7.2 I can now see the the documenation of "#define TEST" from "testdef.c" appearing the the HTML output - This is what is expected. 
In 1.7.1 the documentation for this TEST macro was not generated, because the \cond without \endcond from "cond.c" was still active.
Comment 4 Dimitri van Heesch 2010-10-12 18:52:19 UTC
Good to hear!