Skip to content

Instantly share code, notes, and snippets.

@yangboz yangboz/pylint.xml
Created Jun 29, 2015

Embed
What would you like to do?
Ant Pylint with Jenkins
<!--
@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>
@yangboz

This comment has been minimized.

Copy link
Owner Author

commented Jun 29, 2015

@yangboz

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.