[PATCH] warn about maintaining line numbers with INPUT_FILTER

Anthony Foiani <[email protected]> Tue, 26 Feb 2013 00:38:09 -0700
Newsgroups gmane.text.doxygen.devel
Message-ID <CAOhNY-_tQ3paR6gh9DVOJkg3JSWzJ5dAecuPfmJvH_gcfG6dpA@mail.gmail.com>
Greetings.

I recently spent far longer than I should have, trying to track down
why my code anchors were offset.

It turns out that I had been using:

   INPUT_FILTER = "grep -v 'something to ignore'"

But this removed the lines entirely; that meant that the code scanner
"saw" different line numbers than the cpp-to-html generator.  Once I
realized what was happening, I got the same result by using:

   INPUT_FILTER = "sed -e 's/.*something to ignore.*//'"

But I might have saved myself a few hours if I had seen a warning about it.  :)

Since I was already doing the other patch, here's one to add a bit of
warning text about this possibility.

Thanks once again for the excellent tool!

Best regards,
Anthony Foiani

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
input-filter-lines-warning.patch (application/octet-stream, 966 B)
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index e7ffbfe..56506e9 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -1033,8 +1033,10 @@ void addConfigOptions(Config *cfg)
                  "is the value of the INPUT_FILTER tag, and <input-file> is the name of an\n"
                  "input file. Doxygen will then use the output that the filter program writes\n"
                  "to standard output.\n"
-                 "If FILTER_PATTERNS is specified, this tag will be\n"
-                 "ignored."
+                 "If FILTER_PATTERNS is specified, this tag will be ignored.\n"
+                 "Note that the filter must not add or remove lines; it is applied before the\n"
+                 "code is scanned, but not when the output code is generated.  If lines are\n"
+                 "added or removed, the anchors will not be placed correctly."
                 );
   cs->setWidgetType(ConfigString::File);
   //----