simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Script to count tab spaces in source files


From: ThomasK
Subject: [Simulavr-devel] Script to count tab spaces in source files
Date: Wed, 04 Jan 2012 16:34:40 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Lightning/1.0b2 Thunderbird/3.1.16

Hi,

I've commited now a script to count all tab spaces from source files in simulavr workspace. Goal is to reduce step by step tab spaces from source files.

Why? Usually developers use different editors, as they like. And also different settings. And one of such setting is the size of tab space. So a good indented (and readable and understandable!) source code on one developer look terrible for an other. AND this guy will start changing the indentation again. The result is: we get changes only in whitespace! If this guy makes at first such changes and commit this (and write this also in commit comment!), then it's easy to filter. But this isn't so in every case and it's more hard to review changes, more hard to maintain code and to understand it and so one. (sure, there are reasons for tab's but not for using indentation by tab space character!)

So, it's better to use SOFT-Tabs! Simulavr uses for this a tab space of 4 characters.

And this script should help to check and indentify tabs and to remove it. Simply call "./tab-check.py" in a workarea. There are 2 command line options: -h for help and -d for "detailed", means it lists all source files with tabs and how much tabs are into. Without options it lists only the total of files and tabs.

cu, Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]