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 ! =)
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!
Oops, sorry, accidental double post.
Can you think of a simple way that would help you answer your own question ? =)
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.
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!
There are also a few blocks like this: /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ I'm removing those too.
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.
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
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 =)
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
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 ! =)
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
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 ! =)
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 =)
Created attachment 108249 [details] Removed extra newlines between functions. Aaaaand here's the last patch, removing extra newlines between functions to improve readability :D
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 !
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup) [NinjaEdit]