For a review tool, we want to spot "spaces instead of tabs", so we should use an uncommon tab size. I vote for 7 spaces.
Regarding how to calculate the line-width (for the 80-100 convention), the way my old editor used to do it made the most sense to me: Consider a tab 1 character (because it is).
That also gives the most flexibility in indenting/outdenting blocks without having to worry frequently about it being too long for the 80-100 convention.
The downside of that approach is that a block with 40 characters per line in a block that is indented 8 times may appear to be longer than a block that is not intended at all and has a 100 characters per line (e.g. if your editor shows tabs as 8 spaces, 8 * 8 + 40 = 104).
On Thu, Aug 9, 2012 at 1:24 PM, Platonides platonides@gmail.com wrote:
For a review tool, we want to spot "spaces instead of tabs", so we should use an uncommon tab size. I vote for 7 spaces.
Gerrit already shows this very clearly by showing the red tab symbols.
This is enabled by default and can be changed by setting Differences > Preferences > Show Tabs.
Le 09/08/12 13:24, Platonides a écrit :
For a review tool, we want to spot "spaces instead of tabs", so we should use an uncommon tab size. I vote for 7 spaces.
Just replace whitespaces by meaningful characters, should be easy to implements in any code review tool.
On 13/08/12 06:24, Antoine Musso wrote:
Le 09/08/12 13:24, Platonides a écrit :
For a review tool, we want to spot "spaces instead of tabs", so we should use an uncommon tab size. I vote for 7 spaces.
Just replace whitespaces by meaningful characters, should be easy to implements in any code review tool.
You mean like the "show tabs" option in Gerrit? From a diff page, click "Preferences" in the second-level menu at the top of the screen.
-- Tim Starling
wikitech-l@lists.wikimedia.org