This shows you the differences between two versions of the page.
automated_code_tidying [2017/12/06 11:18] |
automated_code_tidying [2017/12/06 11:18] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Automated Code Tidying ====== | ||
+ | ===== tidy-source.sh ===== | ||
+ | This simple script searches a directory for source files, and performs the following actions: | ||
+ | * Replaces tabs with spaces | ||
+ | * Ensures the file ends with a newline | ||
+ | * Replaces CRLF with LF | ||
+ | * Removes any trailing whitespace on each line of code | ||
+ | < | ||
+ | DIR=$1 | ||
+ | TABWIDTH=4 | ||
+ | |||
+ | ( cd $DIR; for i in $( find -regex " | ||
+ | /;}' | sed ' | ||
+ | |||
+ | git commit -am" | ||
+ | ===== Other Tools ===== | ||
+ | * [[http:// | ||
+ | * [[http:// |