Created
June 29, 2015 09:52
-
-
Save yangboz/238cbc292f6a611a543e to your computer and use it in GitHub Desktop.
Ant Pylint with Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
@ref: http://chrigl.de/blogentries/integration-of-pylint-into-jenkins | |
@ref: http://redsolo.blogspot.com/2007/11/hudson-embraces-python.html | |
@more: http://bitten.edgewall.org/wiki/Documentation/commands.html | |
--> | |
<project default="all" basedir="../"> | |
<!-- | |
Define an environment variable pointing to PyLint folder or change this | |
--> | |
<property environment="env"/> | |
<property name="src.python" location="./"/> | |
<property name="pylint.binary" location="/usr/local/bin/pylint"/> | |
<property name="report.pylint" location="./pylint.log"/> | |
<!-- @ref: http://redsolo.blogspot.com/2007/11/hudson-embraces-python.html --> | |
<target name="clean"> | |
<delete dir="results"/> | |
<delete file="pylint.log"/> | |
</target> | |
<target name="report-pylint" depends="clean"> | |
<exec dir="${src.python}" executable="${pylint.binary}" output="${report.pylint}"> | |
<env key="PYTHONPATH" path="${build.bin}:${build.bin}/lib/"/> | |
<arg line="-f parseable -i y **/*.py --output-format=parseable --ignore-comments=y --min-similarity-lines=4 --disable-msg=R0903 --disable-msg=C0301"/> | |
</exec> | |
</target> | |
<target name="all" depends="report-pylint"/> | |
</project> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ref: http://chrigl.de/blogentries/integration-of-pylint-into-jenkins
@ref: http://redsolo.blogspot.com/2007/11/hudson-embraces-python.html
@more: http://bitten.edgewall.org/wiki/Documentation/commands.html