klen/pylama — pull request #10 by lukaszpiotr (2013-09-29 20:43:44+00:00)
Title: New checker for JavaScript language.

### Scope of this pull request:

- added _Closure-Linter JavaScript_ checker (code: https://code.google.com/p/closure-linter/source/browse/) to **Pylama** checkers,
- added `def gjslint` callback in `pylama\utils.py` to handle `gjslint` linter request,
- extended file extensions in `main.py` by `.js` suffix - default `.py` is always present due to main purpose of the tool,
- introduced unittests in `tests.py` covering added functionalities (to test JavaScript code `dummy.js` was added to the root of **Pylama**)
- fixed failing tests on _Win_ platform, by adding platform check and platform depended errors to ignore,
- extended `README` by `gjslint` entries,
- extended `requirements` section in `README` by `python-gflags` and `curses` for _Win_ platform users (after issues when running on clean Python 2.7 virtualenv).

### Requirements:
- `python-gflags`
- Linux: `sudo apt-get install python-gflags` and verify installation using: `dpkg -s python-gflags`
- Windows: `pip install python-gflags` and verify installation using: `pip freeze`

### Tests:
- Installing **Pylama** with integrated _Closure-Linter_ checker by `python setup.py install` ended successfully.
- New solution was successfully tested (unittests + end-user tests) on _Win_ (v.7) and _Unix/Linux_ (Ubuntu).

### Notes:
- No modifications besides removal of printing utilities were done to _Closure-Linter_ code.
Printing utilities were removed due to common printing interface provided by **Pylama**.

### Usage:
- `pylama.exe --linters=gjslint --ignore=E:0010 --report=report.txt E:\path\to\dir_or_file`
- If Python and JavaScript linters are used at the same time, but in defined directory
there is just JavaScript code or just Python code, then just this linter will be used
for which the code was found. Example:
If in `E:\bootstrap\js` there are just `*.js` files. Usage: `pylama.exe --linters=pep8,gjslinter E:\bootstrap\js` will use just `gjslinter`. It works exactly the same the other way round.