How To Set Up Lint? - ashish-greycube/help GitHub Wiki
Install Lint in particular App
- Go to virtual Environment of Bench
$ source ./env/bin/activate
- In terminal, Go To App
$ cd apps/frappe
-
Install pre-commit package manager using pip:
~/v15-develop/apps/frappe
$ python -m pip install install pre-commit
- Install the git hook scripts
$ pre-commit install
This will configure a git pre-commit hook which will ensure that your changes pass bare-minimum style/correctness requirements for accepting the changes.
- When committing changes, the pre-commit tool automatically formats your code, detects errors, and correct them.
git add .
git commit -m "Add Commit"