-
Notifications
You must be signed in to change notification settings - Fork 35
Coding Guidelines
kynan edited this page Dec 13, 2012
·
2 revisions
Install a Git pre-commit hook automatically checking for tab and whitespace errors before committing. In the root directory of your local Git repository do
git config --local core.whitespace "space-before-tab, tab-in-indent, trailing-space, tabwidth=4"
mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
We're loosely following PEP 0008, in particular:
- indent by 4 spaces, tabs are strictly forbidden
- lines should not exceed 79 characters
- no trailing whitespace at EOL or trailing blank lines at EOF