Bug 62475 - Remove pointless comments and ASCII art
Summary: Remove pointless comments and ASCII art
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillScript
Depends on:
Blocks:
 
Reported: 2013-03-18 14:59 UTC by Thomas Arnhold
Modified: 2017-02-14 08:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
example script, to be extended (8.87 KB, text/x-perl)
2013-03-18 14:59 UTC, Thomas Arnhold
Details
asciitool.py - semi-automated ASCII removal (14.23 KB, text/x-python)
2014-05-13 01:03 UTC, Chris Laplante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arnhold 2013-03-18 14:59:38 UTC
Created attachment 76683 [details]
example script, to be extended

There are many pointless ASCII art graphics in the source which a not necessary with modern editors. See the attached Perl script for some examples.

-- quote from Tor:
Suggested Easy Hack: Replace all instances of // -------- comments
including surrounding newlines with a single newline.

Another Easy Hack, slightly harder to automate: Remove all the
pointless comments that just tell the class name right before the
declaration of that class.
-- end quote

I did some cleanups some time ago. You need to check if some of the existing regex apply to the source (again) and apply it on yet unmatched lines.

To use the script:

find pathtolibo -name *.[hc]xx | xargs perl boxesEmpty.pl
Comment 1 Commit Notification 2013-04-08 08:44:12 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=adea2a859dcc2722fc9db8acb5bddb864f40e0c4

fdo#62475 - remove pointless comments and ASCII art in sw/source/core/doc



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2013-05-05 18:40:01 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f8e8aa828f18ce384839c08e2d082d9d4d92eb3

fdo#62475 - remove pointless comments and ASCII art in sw/source/core/draw



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2013-05-05 18:40:19 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=24c3a58a0782f81eed3902c3aa16868229d24628

fdo#62475 - remove ASCII art in sw/source/core/graphic



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2013-05-05 18:41:22 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9008dfbef5c744e351c6bb1edbfc30f364731c8

fdo#62475 - remove visual noise in sw/source/core/view



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2013-05-06 17:31:36 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=928d86d8a26af86d19b1c1cbcbb512494bf366dd

fdo#62475 - remove ASCII art



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2013-06-08 23:11:00 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3e67062608f11dbf4b92f5e0765bb0f28a6cfe8

fdo#62475 - remove visual noise in sw/source/core/edit



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-06-10 20:06:50 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=39f4f7d95391c5396a1fc92d48cb400c06db68b4

fdo#62475 - remove visual noise in sw/source/core/fields



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2013-06-26 14:23:16 UTC
sonakshi nathani committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=51c79f97a90eaf469d1d2531f3f0eccfafe0f94c

"fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2013-07-17 09:27:42 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e179af1576a7763f3aeb112a41a640057d02c4f0

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2013-07-18 14:10:02 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8ac71b29eeca8b025d7548e1cee519277af7b90f

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2013-07-29 11:48:17 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd9c97d587d2a295d44e8685d253d30542a2c85a

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-07-31 16:36:46 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=608dec14f1fd7b46b294da9341a6da6a24caef91

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2013-08-10 15:08:22 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f360266cd1335861c182493bde6ade0e67b753b

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2013-08-10 19:31:46 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f66b0cb110c2f7d864f96e850015aa1741e1f94

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2013-08-11 19:50:02 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1452e5659796db395efa222d50cc8158275c5442

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2013-08-12 07:06:17 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4eb1232fbcf928e90267318e281aea5e8c9de6db

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2013-08-21 19:27:28 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=349c91c8ec6afc1f5c8499529d559af34d115a76

fdo#62475 , fdo#39468: remove visual noise and translate German comments in svx/source/xoutdev/



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2013-08-27 16:23:05 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2ec606730bc95b58390a609df0a88958869a4066

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2013-08-31 20:11:26 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=91859ae19ca1a9793b8553e120683393f584dfb1

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2013-08-31 20:51:37 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf42b6f9f51b4bc66e267ae24c87ac79122825cc

fdo#62475 - remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2013-08-31 20:51:56 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8d6da3b8aed0b523375e00eb5b5e3c2b4ca89edf

fdo#62475 - remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2013-09-02 20:18:22 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6bb2da3f696d724117a1f3ff5e23e5a7fb3ed314

fdo#62475 - remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2013-09-10 17:39:10 UTC
Jelle van der Waa committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2ddff7b355fac5ba7ec93f866ea52f462dbc6fe

fdo#62475 removed pointless comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2013-09-26 09:33:44 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba665a9957955e8306aa5554d8ce59b56751ea02

fdo#62475: remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2013-10-02 16:13:37 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5050dfc73f194d1d59222cac72e69a917655d816

fdo#62475 - remove visual noise and fix existing comments



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 26 Mohammad Reza Sabouri Karkhaneh 2013-10-04 12:52:17 UTC
I'll try to remove as many pointless comments as I can find.
Comment 27 Björn Michaelsen 2013-10-04 18:46:05 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 28 Commit Notification 2014-02-15 20:24:34 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0ffc090d80707017f5f590c43be6c25184298a93

fdo#62475 - remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 Commit Notification 2014-02-16 19:24:23 UTC
Philipp Riemer committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6a842ebc8bed02ff0678f3ed6d47e4bb2e6e6cd

fdo#62475 - remove visual noise



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 30 Chris Laplante 2014-05-13 01:03:26 UTC
Created attachment 98954 [details]
asciitool.py - semi-automated ASCII removal

I have been working on a tool to semi-automate this process. I have attached an initial version; it's useable, but incomplete. Unless someone has an alternate suggestion, for the time being I will host it here: https://bitbucket.org/MostThingsWeb/asciitool (especially while I don't have commit access). The only preq is colorama: https://pypi.python.org/pypi/colorama

Screenshots: http://imgur.com/a/BO0t2

Currently the tool detects ASCII art in addition to some (but not all) pointless comments. It makes a best effort at preserving justification (leading whitespace).

I say the tool is semi-automated because while it will make a suggestion regarding what to do with each comment, it is ultimately up to you to decide what to do. The tool lets you jump immediately into Vim to edit either its suggestion or the original comment. It provides 5 lines of context before and after, like git diff.

I'd be interested in getting some feedback regarding this, whether it's bug reports, suggested features, or even just "why bother?"
Comment 31 Commit Notification 2015-05-15 17:56:33 UTC
Andrea Gelmini committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5b1337f7b2e1f79d78d4bf6559bd84f1ebb934bf

tdf#62475: partial handmade fixes

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 32 Tomaz Vajngerl 2015-05-16 14:34:25 UTC
Regarding the latest commit: Actually comments like "// namespace xy" and "// end namespace xy" are there for clarity so you don't wonder why there is a closing bracket all of a sudden. I always add them and I'm not really happy that some were removed. Additionally "/**" tag is recognized by doxygen - I'm not sure if "//" is recognized, it should be "///" for doxygen.
Comment 33 Kohei Yoshida 2015-05-16 14:43:16 UTC
/** */ tags are one of the standard ways of documenting class/struct/method etc.  It's originally known as Javadoc and has been adopted by doxygen and other code documentation parsers.  You shouldn't be replacing those with //'s.
Comment 34 How can I remove my account? 2015-05-16 17:25:25 UTC
I think namespace end comments are unnecessary when the namespace block is just a few lines, though. Do you agree, Tomaz? Of course one could also argue that for consistency, they should be used in those cases, too.
Comment 35 Tomaz Vajngerl 2015-05-17 02:26:34 UTC
Sure, I agree. Looking again at the removed ones - they are mostly of the simple kind. But I had to complain before somebody has the idea to mass remove all of them.
Comment 36 Robinson Tryon (qubit) 2015-12-14 06:56:16 UTC Comment hidden (obsolete)
Comment 37 Robinson Tryon (qubit) 2016-02-18 14:52:03 UTC Comment hidden (obsolete)
Comment 38 adamkasztenny 2016-03-26 20:28:14 UTC
Is there still something to be done for this issue, or is it resolved? I'm new around here so I'd like something simple to start with.
Comment 39 jani 2016-03-27 16:53:33 UTC
(In reply to adamkasztenny from comment #38)
> Is there still something to be done for this issue, or is it resolved? I'm
> new around here so I'd like something simple to start with.

I assume there are since it is not closed, however it is one of those bugs, where you have to go hunting to find work to do.
Comment 40 jani 2016-04-18 07:55:29 UTC
In case this is still open, we need a fresh code pointer