Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vorushin/sublimetext_python_checker
Integration of pep8 and pyflakes checkers for python files in SublimeText 2 editor (Linux/MacOSX only)
https://github.com/vorushin/sublimetext_python_checker
Last synced: 13 days ago
JSON representation
Integration of pep8 and pyflakes checkers for python files in SublimeText 2 editor (Linux/MacOSX only)
- Host: GitHub
- URL: https://github.com/vorushin/sublimetext_python_checker
- Owner: vorushin
- Created: 2011-05-23T16:08:13.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-17T13:02:48.000Z (about 12 years ago)
- Last Synced: 2024-08-01T22:57:36.847Z (3 months ago)
- Language: Python
- Homepage:
- Size: 180 KB
- Stars: 77
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Python PEP-8 and PyFlakes checker for SublimeText 2 editor
This project is a plugin for [SublimeText 2](http://www.sublimetext.com/2) text editor.
It checks all python files you opening and editing through two popular Python checkers - [pep8](http://pypi.python.org/pypi/pep8)
and [PyFlakes](http://pypi.python.org/pypi/pyflakes).## Installation
Go to your Packages dir (Sublime Text 2 -> Preferences -> Browse Packages). Clone this repository into Packages subdirectory:
git clone git://github.com/vorushin/sublimetext_python_checker.git
Go to sublimetext_python_checker/ and create file local_settings.py with list of your preferred checkers:
CHECKERS = [('/Users/vorushin/.virtualenvs/checkers/bin/pep8', []),
('/Users/vorushin/.virtualenvs/checkers/bin/pyflakes', [])]First parameter is path to command, second - optional list of arguments. If you want to disable line length checking in pep8, set second parameter to ['--ignore=E501'].
You can also set syntax checkers using sublimetext settings (per file, global,
per project, ...):
"settings":
{
"python_syntax_checkers":
[
["/usr/bin/pep8", ["--ignore=E501,E128,E221"] ]
]
}
Both "CHECKERS local_settings" and sublime text settings will be used,
but sublime text settings are prefered. (using syntax checker binary name)Restart SublimeText 2 and open some *.py file to see check results. You can see additional information in python console of your editor (go View -> Show Console).
## Why not sublimelint
Before creating this project I used [sublimelint](https://github.com/lunixbochs/sublimelint), which is multilanguage
checker/linter. I described pros and cons of both below.### sublimelint
- can't use your Python version or your virtualenv
- don't check with pep8
- do checks on every edit
- do checks for Python (derivative of pyflakes), PHP, Perl, Ruby
- works on Windows/Linux/MacOSX### sublimetext_python_checker
- can use your version of Python and your virtualenv
- do checks only on opening and saving files
- works only on Linux and Mac OS X
- checks only Python files
- checks with pep8 and pyflakes
- all this in a few screens of code