Bug 83991 - remove bogus folding comments...
Summary: remove bogus folding comments...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.3.0.2 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2014-09-17 13:03 UTC by Michael Meeks
Modified: 2015-12-15 16:27 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Cleaned up the first comments on the files. (178.05 KB, text/plain)
2014-10-21 02:07 UTC, Vinicius Vendramini
Details
Removed the comments without changing the indentation (128.83 KB, text/plain)
2014-10-22 10:58 UTC, Vinicius Vendramini
Details
Removed the comments at the end of some files (6.58 KB, text/plain)
2014-10-22 15:38 UTC, Vinicius Vendramini
Details
Removed extra newlines between functions. (69.16 KB, text/plain)
2014-10-22 17:06 UTC, Vinicius Vendramini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-09-17 13:03:38 UTC
It seems like someone went wild with a folding editor inside:

mysqlc/source eg.

/* {{{ OStatement::execute() -I- */

which adds no value.  We should also remove any blocks like this, and leave a single space between functions to enhance readability.

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: noet sw=4 ts=4 fdm=marker
 * vim<600: noet sw=4 ts=4
 */

Thanks ! =)
Comment 1 Vinicius Vendramini 2014-10-07 11:43:09 UTC
Hi,

I'd like to try this out as my first contribution to the project, but I have a few simple questions: is this file the only one that needs changing, or have you found more comments like these on other files? Should I look for other files?

Thanks!
Comment 2 Vinicius Vendramini 2014-10-07 11:43:30 UTC
Hi,

I'd like to try this out as my first contribution to the project, but I have a few simple questions: is this file the only one that needs changing, or have you found more comments like these on other files? Should I look for other files?

Thanks!
Comment 3 Vinicius Vendramini 2014-10-07 11:44:15 UTC
Oops, sorry, accidental double post.
Comment 4 Michael Meeks 2014-10-07 12:00:22 UTC
Can you think of a simple way that would help you answer your own question ? =)
Comment 5 Vinicius Vendramini 2014-10-08 11:24:59 UTC
Ok... I'm gonna take a look at this file, try to find some patterns in these comments and look for them in other files. Sounds ok? =D
Off I go.
Comment 6 Vinicius Vendramini 2014-10-08 11:29:13 UTC
Oh, now I get it. It's a folder and there's a bunch of weird files in there. I'll take care of them, and then look for similar comments in other places.

Cheers!
Comment 7 Vinicius Vendramini 2014-10-08 12:17:30 UTC
There are also a few blocks like this:

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

I'm removing those too.
Comment 8 Michael Meeks 2014-10-08 14:47:15 UTC
Thanks =) Please make sure you separate concerns; ie. just remove one class of silly types of commits in each commit [ are you setup with gerrit eg. - if not just attach a patch here ].

This guy:

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

is vitally important for vim users, and we have an emacs version at the head of each file & that's intended - so I'd leave those alone ;-)

Looking forward to your patch.
Comment 9 Vinicius Vendramini 2014-10-09 14:12:29 UTC
Ok, I'll leave the vim comments alone :) I suppose the emacs comments are these guys:

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

So I'll just leave them alone too.

I'm not set up with garret, so I'll attach a patch when I'm done. Should I just attach a zip or tar with the changed files or is there any standard procedure for this?

Thanks for all the help =D
Comment 10 Michael Meeks 2014-10-09 15:02:46 UTC
Just do:

git diff > /tmp/changes.diff

and attach that file.

For a more advanced version do:

git commit -a
enter a commit message
git format-patch -1

And please try to do only -one- kind of cleanup in each commit - so we can review them, improve, revert, edit each separately.

Thanks =)
Comment 11 Vinicius Vendramini 2014-10-21 02:07:22 UTC
Created attachment 108142 [details]
Cleaned up the first comments on the files.

I cleaned up the first type of comments and tried to create a patch, but that didn't quite work out so this is the diff file (git diff > changes.diff). 

I think my IDE accidentaly changed some of the indentation (mostly in whitespace-only lines), so sorry about that =P. I can recreate the changes in vim if needed (to avoid this problem), but it might take some time.

If this is ok, I'll post the second part soon (cleaning up the other comments) =D
Comment 12 Michael Meeks 2014-10-21 19:48:59 UTC
Unfortunately as you say the patch rather significantly breaks indentation all across the file - not just on whitespace lines (did you read the diff) ? =)

So - you need to do: 'git stash' (which will save that) and start again I think - using a better editor, or perhaps a perl/sed script to help =)

Sorry - but thanks for trying & looking forward to success here ! =)
Comment 13 Vinicius Vendramini 2014-10-22 10:58:13 UTC
Created attachment 108229 [details]
Removed the comments without changing the indentation

Ok, let's try this again =)

This time I used mostly perl and vim, so no indentation should have been affected. I double checked it, so I really hope there's nothing wrong this time... I'm gonna upload two other patches next, one removing the comments at the end of the files and one fixing the whitespace between functions, as requested =D
Comment 14 Michael Meeks 2014-10-22 11:02:57 UTC
Lovely - thanks for that :-) pushed to master.

Please check that you've sent a license confirmation to the developers mailing list cf.

https://wiki.documentfoundation.org/Development/Developers

Thanks ! =)
Comment 15 Vinicius Vendramini 2014-10-22 15:38:53 UTC
Created attachment 108237 [details]
Removed the comments at the end of some files

Ok, great! I've sent an email to the devs with the statement from that page. Here's the second patch, removing the comments from the end of the files; last one should be coming right up =)
Comment 16 Vinicius Vendramini 2014-10-22 17:06:19 UTC
Created attachment 108249 [details]
Removed extra newlines between functions.

Aaaaand here's the last patch, removing extra newlines between functions to improve readability :D
Comment 17 Michael Meeks 2014-10-23 09:38:41 UTC
Pushed; as a next step - it'd be great to start pushing to gerrit if you can get that setup - it's much easier to review / merge from there =)

Thanks !
Comment 18 Robinson Tryon (qubit) 2015-12-15 16:27:28 UTC
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup)
[NinjaEdit]