EatLint
About
EatLint is a Trac plugin that adds a lint report summarizer and a lint chart to Bitten. This means that when a Bitten build that includes a lint step the output can not only be captured but reported on. The report shows the number of problems per file by category: convention, refactor, error, and warning as well as showing the totals for each file, for each category, and a grand-total showing the state of the entire project. Similarly the chart plugin charts the total number of problems as well as individual lines for each category. This gives you an idea of the readability of your project's code over time.
License
EatLint's code and templates are based on the code and templates provided by the Bitten project for coverage and unittest data. The Bitten code and templates are provided under a BSD-style license and so is this plugin. Please see License for a copy of the license.
Example
An example build recipe might like this:
<build xmlns:python="http://bitten.cmlenz.net/tools/python"
xmlns:svn="http://bitten.cmlenz.net/tools/svn"
xmlns:sh="http://bitten.cmlenz.net/tools/sh">
<step id="checkout" description="Checkout source">
<svn:checkout path="${path}" url="http://echospiral.com/svn/eatlint" revision="${revision}"/>
</step>
<step id="lint" description="Gather lint report">
<sh:exec executable="pylint" args="eatlint -f parseable" output="pylint.out"/>
<python:pylint file="pylint.out"/>
</step>
</build>
Installation
Installation:
Installation is done just as for any other Trac plugin. Using the easy_install command from setuptools is the easiest (provided you have already setuptools installed):
easy_install eatlint
Or you can access the releases directly on the EatLint Cheeseshop page.
After it is installed you must configure your Trac project to use the plugin. Edit conf/trac.ini in your Trac directory to include this:
[components] eatlint.* = enabled
Future
I'm currently looking to add some components for analyzing .Net assemblies (think C# and VisualBasic?). These tools report significantly different information so I'll probably end up creating a new report category. Stay tuned for more information.
These additions would be made:
- A bitten.recipe_commands entry point in order to import code analysis statistics into the bitten build db.
- An IReportSummarizer component for summarizing code analysis.
- An IReportChartGenerator component for charting code analysis over time.
- Templates for the above (similar to EatLint?'s existing pylint templates).
- As a consequence of the above, Bitten's build db will end up with another report category. The name of this category is undecided but considering how many different statistics each code analysis tool reports it may be necessary to pick something pretty package-specific.
At least as a starting point I am looking at supporting Microsoft's FxCop?. This tool is free (as in beer) and seems like a logical starting point.
