workflow on Win with pure Pylama and pure gjslint - lukaszpiotr/pylama_with_gjslint GitHub Wiki

workflow pure pylama

  1. enter into: E:\cc

  2. run C:\Python27\Scripts\virtualenv.exe pylama --no-site-packages

  3. run E:\cc\pylama\Scripts\activate

  4. run pip freeze

  5. enter into E:\cc\code_pylama

  6. clone https://github.com/klen/pylama.git

  7. enter E:\cc\code_pylama\pylama

  8. run tests: python -m unittest discover

    • if tests failed:
      • install: curses-2.2.win32-py2.7.exe : http://www.lfd.uci.edu/~gohlke/pythonlibs/ from C:\Python27\Lib\site-packages to pylama virtualenv E:\cc\pylama\Lib\site-packages move following items:
        • _curses.pyd
        • _curses_panel.pyd
        • _curses-2.2-py2.7.egg-info
    • now running pip freeze should result in -curses==2.2
  9. run the tool from E:\cc\code_pylama\pylama using: python -m pylama.main

  • python -m pylama.main --linters=pep8,mccabe --report=report.txt E:\path\to\dir_or_file

workflow pure gjslint (Google JavaScript Style Guide)

  1. enter into E:\cc\code_gjslint

  2. svn checkout http://closure-linter.googlecode.com/svn/trunk/ closure-linter

  3. run the tool from E:\cc\code_gjslint using python closure_gjslint\gjslint.py

    • if execution results in ImportError: No module named gflags add to E:\cc\pylama\Lib\site-packages following items (take them from: C:\Python27\Lib\site-packages):
      • gfags.py
      • gflags_validator.py
  4. run the tool from E:\cc\code_gjslint using python closure_gjslint\gjslint.py

    • if execution results in ImportError: No module named closure_linter
      • run: set PYTHONPATH=E:\cc\code_gjslint
      • and confirm existence of this path in current environment using: echo %PYTHONPATH%
  5. run:

    • flat: python closure_gjslint\gjslint.py my_js_file.js
    • recursive: python closure_gjslint\gjslint.py -r E:\bootstrap\js
     ----- FILE  :  E:\bootstrap\js\bootstrap.js -----
     Line 21, E:0001: Extra space after "function"
     Line 23, E:0131: Single-quoted string preferred over double-quoted string.
     Line 29, E:0001: Extra space after "function"
     Line 31, E:0001: Extra space after "function"
     Line 33, E:0001: Extra space after "function"