Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

This repository contains linting tools for Khan Academy's codebase.

It uses existing linting tools (pep8, pyflakes, jshint, etc), but has been modified to suit Khan Academy's slightly different style guides.

This repository also contains a wrapper scripts that can be used as a pre-commit hook for Git.


You should add the local bin/ directory to your system $PATH, for example:

export PATH=$PATH:~/path/to/khan-linter/bin

All dependencies are vendored within the repository itself, so no installation beyond cloning this repository is required.



If you would like to lint manually, invoke /path/to/ or ka-lint.

By default, this will lint all files under the current directory. Alternately, you can specify files on the command line to lint. See

ka-lint --help

for more options.


You can update the blacklist file in this repository to control what files should not be linted at all. Alternately, you can create a blacklist of your own, and use the --blacklist_file flag to (you'll have to modify or to pass in the name of the blacklist file as well).

To suppress the lint check, set the environment variable FORCE_COMMIT=1 prior to calling git commit.