Hi,
After my commit of today, Johan Engelen pointed out that there were quite some tabstops being used in it instead of spaces. I started an automated find & replace, replacing all tabs with four spaces in just that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
Diederik
On Sat, 2007-11-03 at 22:33 +0100, Diederik van Lierop wrote:
I also found tens of thousands of tabs when searching just *.h in /src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
It's not a bad idea, but in general it messes up a lot of people on distributed version control and those who have checkouts. In general, it's best to do these type of changes right after a release when the codebase is already frozen.
--Ted
See: http://wiki.inkscape.org/wiki/index.php/InkscapeJanitors#Cleanup:_Whites pace
I vote for mass cleansing of tabs and trailing spaces at the start of feature freeze for this release. I'm afraid it is never going to happen otherwise :/
Johan
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Diederik van Lierop Sent: zaterdag 3 november 2007 22:34 To: inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] tabs
Hi,
After my commit of today, Johan Engelen pointed out that there were quite some tabstops being used in it instead of spaces. I started an automated find & replace, replacing all tabs with four spaces in just that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
Diederik
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Oh, good thought. Sounds like the best time for this would be during Hard Freeze, when no one but release managers can commit anyway, but we've not yet branched. I'll stick it in there unless anyone feels strongly otherwise.
Bryce
On Sat, Nov 03, 2007 at 10:53:55PM +0100, J.B.C.Engelen@...1578... wrote:
See: http://wiki.inkscape.org/wiki/index.php/InkscapeJanitors#Cleanup:_Whites pace
I vote for mass cleansing of tabs and trailing spaces at the start of feature freeze for this release. I'm afraid it is never going to happen otherwise :/
Johan
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Diederik van Lierop Sent: zaterdag 3 november 2007 22:34 To: inkscape-devel@lists.sourceforge.net Subject: [Inkscape-devel] tabs
Hi,
After my commit of today, Johan Engelen pointed out that there were quite some tabstops being used in it instead of spaces. I started an automated find & replace, replacing all tabs with four spaces in just that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
Diederik
This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Sat, Nov 03, 2007 at 10:33:34PM +0100, Diederik van Lierop wrote:
Hi,
After my commit of today, Johan Engelen pointed out that there were quite some tabstops being used in it instead of spaces. I started an automated find & replace, replacing all tabs with four spaces in just that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
Diederik, would you and Johan mind taking responsibility for providing (and testing/reviewing) a script for doing this tab to space conversion?
Bryce
On Nov 3, 2007, at 2:33 PM, Diederik van Lierop wrote:
After my commit of today, Johan Engelen pointed out that there were quite some tabstops being used in it instead of spaces. I started an automated find & replace, replacing all tabs with four spaces in just that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in / src. Now I wonder: should we do a massive search & replace on the full code base? I've tried and it compiles nicely. It also doesn't mess up the indenting, at least not in the places I've looked at. Is it worth it? Or will it give to much troubles in the end afterall?
I've seen a few places where just converting to four spaces will not get the right formatting, so it could be slightly more complex than that.
Trailing whitespace, on the other hand, is safe to purge. Emacs even has a command that does it. :-)
One factor is if things with tabs are properly indented already or not. Another one is edge cases, like when parameters to a function are spread onto more than a single line.
Also, you should check if any of the files in question are missing the formatting footer we've been adding. That's something to put in as a first step.
Once you look to change something you could do is run the files through emacs' indent-region and compare the result to your space- replaced ones. If there is any difference, then those could be marked for later review.
Please someone have a look at this: http://wiki.inkscape.org/wiki/index.php/Coding_Style#Tabs_and_Alignment_ .28is_there_still_discussion_about_this.3F_I_think_we_settled_on_4_space s_for_indentation_and_.2Ano.2A_tabs_anywhere.29
(the Tabs and Alignment section)
Please make it say: NO TABS , USE 4 SPACES! Should we delete the discussion stuff, or keep it there?
Johan
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Jon A. Cruz Sent: zondag 4 november 2007 0:54 To: Diederik van Lierop Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] tabs
On Nov 3, 2007, at 2:33 PM, Diederik van Lierop wrote:
After my commit of today, Johan Engelen pointed out that there were
quite some tabstops being used in it instead of spaces. I started an
automated find & replace, replacing all tabs with four spaces in just
that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src.
Now I wonder: should we do a massive search & replace on the full code
base? I've tried and it compiles nicely. It also doesn't mess up the
indenting, at least not in the places I've looked at. Is it worth it? Or
will it give to much troubles in the end afterall?
I've seen a few places where just converting to four spaces will not get the right formatting, so it could be slightly more complex than that.
Trailing whitespace, on the other hand, is safe to purge. Emacs even has a command that does it. :-)
One factor is if things with tabs are properly indented already or not. Another one is edge cases, like when parameters to a function are spread onto more than a single line.
Also, you should check if any of the files in question are missing the formatting footer we've been adding. That's something to put in as a first step.
Once you look to change something you could do is run the files through emacs' indent-region and compare the result to your space-replaced ones. If there is any difference, then those could be marked for later review.
Thanks for pointing this out, it's done now.
On Sun, Nov 04, 2007 at 01:23:49AM +0100, J.B.C.Engelen@...1578... wrote:
Please someone have a look at this: http://wiki.inkscape.org/wiki/index.php/Coding_Style#Tabs_and_Alignment_ .28is_there_still_discussion_about_this.3F_I_think_we_settled_on_4_space s_for_indentation_and_.2Ano.2A_tabs_anywhere.29
(the Tabs and Alignment section)
Please make it say: NO TABS , USE 4 SPACES! Should we delete the discussion stuff, or keep it there?
Johan
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of Jon A. Cruz Sent: zondag 4 november 2007 0:54 To: Diederik van Lierop Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] tabs
On Nov 3, 2007, at 2:33 PM, Diederik van Lierop wrote:
After my commit of today, Johan Engelen pointed out that there were
quite some tabstops being used in it instead of spaces. I started an
automated find & replace, replacing all tabs with four spaces in just
that commit. Worked like a charm.
I also found tens of thousands of tabs when searching just *.h in /src.
Now I wonder: should we do a massive search & replace on the full code
base? I've tried and it compiles nicely. It also doesn't mess up the
indenting, at least not in the places I've looked at. Is it worth it? Or
will it give to much troubles in the end afterall?
I've seen a few places where just converting to four spaces will not get the right formatting, so it could be slightly more complex than that.
Trailing whitespace, on the other hand, is safe to purge. Emacs even has a command that does it. :-)
One factor is if things with tabs are properly indented already or not. Another one is edge cases, like when parameters to a function are spread onto more than a single line.
Also, you should check if any of the files in question are missing the formatting footer we've been adding. That's something to put in as a first step.
Once you look to change something you could do is run the files through emacs' indent-region and compare the result to your space-replaced ones. If there is any difference, then those could be marked for later review.
participants (5)
-
unknown@example.com
-
Bryce Harrington
-
Diederik van Lierop
-
Jon A. Cruz
-
Ted Gould