Lint and code-munging tools for Khan Academy codebase
Python JavaScript Makefile
Pull request Compare This branch is 134 commits ahead of benkomalo:master.
Latest commit 5f75175 Jun 21, 2016 @rileyjshaw rileyjshaw Add frontend spacing rules to the linter
Summary:
In a recent survey we decided to lint against extra spaces in objects,
arrays, etc. These rules should cover our bases for everything but
destructuring.

Based on the description of 68a5ad7,
I'm not going to try upgrading to v2 yet. I added a comment to add
`"template-curly-spacing"` when the time comes.

I'm waiting for the exercise transition in D28362 to ship before
grandfathering in webapp code. I'll follow a procedure similar to
D25634.

Depends on D28362, as well as some upcoming diffs which will add
nolint statements to existing repos.

Test Plan:
- make lint

A bunch of new lint errors should pop up :)

Reviewers: kevinb, csilvers

Reviewed By: csilvers

Subscribers: csilvers

Differential Revision: https://phabricator.khanacademy.org/D28403
Failed to load latest commit information.
bin
node_modules Update eslint to to fix object rest destructuring bug May 10, 2016
vendor
.arcconfig
.arclint
.gitignore
LICENSE
Makefile
README
__init__.py
eslint_reporter.js
eslintrc
eslintrc.browser
eslintrc.node
eslintrc.shared
githook.py
hook_lib.py
lesshint_reporter.js
lint_blacklist.txt
lint_util.py
linters.py
package.json
requirements.txt vendor all dependencies May 19, 2015
runlint.py
static_content_refs.py

README

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.

Installation
============
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.

Usage
=====

Manual
------
If you would like to lint manually, invoke `/path/to/runlint.py` 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.

Automatic
---------
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 runlint.py
(you'll have to modify hghook.py or githook.py to pass in the name of the
blacklist file as well).

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