How To Set Up Lint? - ashish-greycube/help GitHub Wiki

Install Lint in particular App

  1. Go to virtual Environment of Bench
$ source ./env/bin/activate
  1. In terminal, Go To App
$ cd apps/frappe
  1. Install pre-commit package manager using pip:

    ~/v15-develop/apps/frappe

$ python -m pip install install pre-commit
  1. 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.

  1. When committing changes, the pre-commit tool automatically formats your code, detects errors, and correct them.
git add .
git commit -m "Add Commit"