Re: Semi-automated ASCII art removal tool
Hi Kendy, I've completed a sizable rewrite of the tool. Doxygen comment formatting (both C and C++ style) is now preserved. As an added little bonus, the tool detects comments containing Doxygen commands (e.g. @brief, \example) but that are not formatted as Doxygen comments, and will suggest the fix. For completeness here are the other major changes: - Useless comment detection is much more accurate. It now searches for type declarations directly after comments, and uses that information to determine if a comment can be removed. - Remembers decisions to ignore comments (by creating a persistence file in the directory in which it is run) - Command line arguments - Better whitespace handling - Lots of bugfixes Enjoy - Chris -- View this message in context: http://nabble.documentfoundation.org/Semi-automated-ASCII-art-removal-tool-tp4108832p4110134.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Semi-automated ASCII art removal tool
Hi Chris, mostthingsweb píše v St 14. 05. 2014 v 14:01 -0700: I have been working on a tool to semi-automate the process of removing ASCII art and pointless comments (ref: https://bugs.freedesktop.org/show_bug.cgi?id=62475). Unless someone has an alternate suggestion, for the time being I will host it here: https://bitbucket.org/MostThingsWeb/asciitool. Screenshots: http://imgur.com/a/BO0t2 This is cool! :-) - thanks for that. Just a small thing; the last screenshot that removes '/**' /** something something */ This style of comment has a special meaning for Doxygen which parses such comments, and adds them to the automatically generated documentation like http://docs.libreoffice.org/sw/html/classDocxAttributeOutput.html#a13f211c2bbce84cee1017b3d78c048a3 etc. I would suggest that your tool should leave the comments like /// /** /// untouched. Of course, /*** does not have any meaning for Doxygen, and should go away ;-) But a thing like /*//** should turn into /** only; etc. The full list of comments understood by Doxygen is here: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html I'd be interested in getting some feedback regarding this, whether it's bug reports, suggested features, or even just why bother?. I like it! :-) - thanks again for writing it. All the best, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Semi-automated ASCII art removal tool
A minimal request: Please handle also *.m, *.mm (Objective-C and Objective-C++) and *.h files. --tml ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Semi-automated ASCII art removal tool
Added support for .m, .mm, and .h. Thanks for the suggestion. Chris -- View this message in context: http://nabble.documentfoundation.org/Semi-automated-ASCII-art-removal-tool-tp4108832p4108938.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Semi-automated ASCII art removal tool
Hi Kendy - thanks for the suggestions! Now that you mention it, I think the tool should have been more careful with http://i.imgur.com/VwHYt83.png as well. In that case it should be safe to collapse the leading /*** into just /**, right? I think I'll take a peek at how Doxygen itself parses comments for some inspiration. I suppose as a quick heuristic I can just look for things like @param and @return, or \brief and if found treat blocks as Doxygen comments. Though the single line /// format makes things trickier... Anyway, I'll play around with it today. Thanks again! Chris -- View this message in context: http://nabble.documentfoundation.org/Semi-automated-ASCII-art-removal-tool-tp4108832p4108942.html Sent from the Dev mailing list archive at Nabble.com. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice