Hey Philip,
A fix for problem (1) is currently being discussed by people cleverer
than I, and hopefully will be released fairly soon. For the moment, you
can work around it by editing your Python2x\Scripts\pylint.bat, and
changing the statement:
exit(ERRORVALUE)
to say
exit /B (ERRORVALUE)
(2) From 'pylint --help', there is a command-line switch:
--indent-string=<string>
String used as indentation unit. This is
usually " " (4 spaces) or "\t" (1 tab). [current: ' ']
Best regards,
Jonathan
Jonathan Hartley Made of meat. http://tartley.com
tart...@tartley.com +44 7737 062 225 twitter/skype: tartley
On 29/12/2009 22:00, Daniel Harding wrote:
Pierre Rouleau wrote:
Unfortunately, the pylint.bat file as submitted by Daniel does not
completely work (at least on XP SP3, and probably other versions as
well). The problem lies in the fact that SHIFT does not remove the
--exitcode from %* expansion but removes it from "%~f0", the reverse
from what is wanted in the original intent of the code.
Thanks for catching that - I wasn't aware of that.
Another problem with the submitted batch is the fact that endlocal is
never called (but selocal is called twice).
The second setlocal was accidentally left from an earlier version of
the file. However, endlocal is not needed, because an implicit
endlocal is performed by Windows when the batch file finishes for
every setlocal that is called during the batch file.
I created a new version of pylint.bat that solves the mentioned
problems. It has a limitation of being able to support only 8
parameters when the --exitcode parameter is specified. I wish Ièd
found a better way to handle the arguments but, as I said, SHIFT does
not impact %* expansion. If anyone has a better idea, let me know.
I was able to find a technique on Stack Overflow to get an arbitrary
number of arguments:
http://stackoverflow.com/questions/761615/is-there-a-way-to-indicate-the-last-n-parameters-in-a-batch-file
I adapted the code shown there to implement removing the --exitcode
parameter and passing all remaining arguments to python. Currently
the code I have written only detects the --exitcode parameter if it is
the first argument, but it would be easy to modify the code to detect
and remove the --exitcode parameter from any position in the argument
list.
I have attached my latest revision of pylint.bat. Feedback is welcome.
Cheers,
Daniel
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects