This tool will analyze and optionally repair files for correct mixed-tabs indention. The file contains repair-indention.php and ShellTools.class. Both need to be in the same directory for this tool to work, but the repair-indention.php file can be run from anywhere.
By default this tool will only analyze the files and return the lines that need repaired. To have it also repair the indention itself add the -s option to the command. By default it will also make a backup file of the original with the ".bak" extension. To change this use the -b option, or to disable backups entirely use the -n option.
Usage: repair-indention.php [options] [[<path>|<file>]...] -h This help information. -s Repair errors and save. -b .ext Make a backup using "ext". Default is ".bak". -n Don't make a backup when saving. While it wouldn't make sense to use this with -b, it is allowed. Using this option after -b will override backups, and vice versa. -t # Set tab width. Defaults to 8. -e true|false Set if tabs should be interpreted as expansions to the next column. Default is true. -f string Comma-delimited string of extensions to search. Defaults to "php,inc,class" Examples: Set tab width to 4 and search .php, .inc, .class, and .tpl files: ./repair-indention.php -t 4 -f php,inc,class,tpl Save changes and make a backup as .backup: ./repair-indention.php -s -b .backup Save, backup, tab width, and files in one. Note the parameters follow the order of the arguments: ./repair-indention.php -sbtf .backup 4 tpl<pre>
Click on a date/time to view the file as it appeared at that time.
|current||11:56, 7 December 2006||(4 KB)||Zimzat||This tool will analyze and optionally repair files for correct mixed-tabs indention. The file contains '''repair-indention.php''' and '''ShellTools.class'''. Both need to be in the same directory for this tool to work, but the '''repair-indention.php''' f|