Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit revises the `code_lint.sh` script and renames it to `pre_commit.sh`. It adds checks to create the pre-commit hook if the script is ran from the root directory of the repo for the first time. Then, it uses Black to automatically format the project code. Also, it will temporarily stash uncommitted changes so Black will not overwrite someone's files that are still a work in progress. The stash should be popped (i.e. the changes are restored) at the end. More reading: https://githooks.com/ https://codeinthehole.com/tips/tips-for-using-a-git-pre-commit-hook/ http://omerkatz.com/blog/2013/5/23/git-hooks-part-2-implementing-git-hooks-using-python Signed-off-by: Justin W. Flory <[email protected]>
- Loading branch information