Changes

Jump to navigation Jump to search
→‎Tools: more detailed examples of how to run pylint / pep8
Line 55: Line 55:  
When possible use tools to check your code, this will save lots of time for everybody involved.
 
When possible use tools to check your code, this will save lots of time for everybody involved.
   −
Please try to use [http://www.logilab.org/857 pylint] to verify your patch for things like exceeding 80 columns etc., unused imports and unused variables. Pylint is not a tool you can rely on 100%, but it helps to follow some guidelines and to avoid the most stupid errors like typos. To run it: "./sugar-jhbuild run pylint sugar jarabe".
+
Please try to use [http://www.logilab.org/857 pylint] to verify your patch for things like exceeding 80 columns etc., unused imports and unused variables. Pylint is not a tool you can rely on 100%, but it helps to follow some guidelines and to avoid the most stupid errors like typos. It gets called with the name of the (installed) Python module to check, e.g. for sugar:
 +
./sugar-jhbuild build -n jarabe
 +
./sugar-jhbuild run pylint jarabe
   −
[http://github.com/cburroughs/pep8.py pep8.py] catches more style errors than pylint, so make sure to run that one, too.
+
You can also run it on individual files so you don't need to install first (doesn't work well for sugar-base and sugar-toolkit because they use the same module name):
 +
./sugar-jhbuild run pylint source/sugar-datastore/src/carquinyol/*.py
 +
 
 +
[http://github.com/cburroughs/pep8.py pep8.py] catches more style errors than pylint, so make sure to run that one, too:
 +
./sugar-jhbuild run pep8 --repeat source/sugar-datastore/src/carquinyol/*.py
    
In the sugar packages use 'make distcheck' to make sure all files are included and the POTFILES.in is up to date.
 
In the sugar packages use 'make distcheck' to make sure all files are included and the POTFILES.in is up to date.
344

edits

Navigation menu