Platform Team/Sugar Lint: Difference between revisions
Appearance
No edit summary |
|||
Line 5: | Line 5: | ||
A set of configuration files and scripts to [http://en.wikipedia.org/wiki/Lint_%28software%29 lint] various sugar related code. | A set of configuration files and scripts to [http://en.wikipedia.org/wiki/Lint_%28software%29 lint] various sugar related code. | ||
For python files, sugar-lint will call pylint (should be installed before) with custom configuration file and pep8.py (comes with sugar-lint sources). | |||
== Usage == | |||
Clone sugar-lint repository: | |||
git clone git://git.sugarlabs.org/sugar-lint/mainline.git ''<local-path>'' | |||
Add sugar-lint command to PATH e.g. to ~/.bashrc (you need to relogin): | |||
echo PATH=''<local-path>'':$PATH >> ~/.bashrc | |||
To lint files: | |||
sugar-lint ''<file>'' | |||
To lint all files recursively: | |||
sugar-lint -r . | |||
To add pre-commit git hook to lint files before commiting arbitrary project: | |||
ln -s ''<local-path>''/sugar/lint/git-pre-commit-hook ''<project-root>''/.git/hooks/pre-commit | |||
== Resources == | == Resources == | ||
* [http://git.sugarlabs.org/projects/sugar-lint sources] | * [http://git.sugarlabs.org/projects/sugar-lint sources] |
Revision as of 08:31, 5 July 2010
Summary
A set of configuration files and scripts to lint various sugar related code.
For python files, sugar-lint will call pylint (should be installed before) with custom configuration file and pep8.py (comes with sugar-lint sources).
Usage
Clone sugar-lint repository:
git clone git://git.sugarlabs.org/sugar-lint/mainline.git <local-path>
Add sugar-lint command to PATH e.g. to ~/.bashrc (you need to relogin):
echo PATH=<local-path>:$PATH >> ~/.bashrc
To lint files:
sugar-lint <file>
To lint all files recursively:
sugar-lint -r .
To add pre-commit git hook to lint files before commiting arbitrary project:
ln -s <local-path>/sugar/lint/git-pre-commit-hook <project-root>/.git/hooks/pre-commit