[code-quality] Common error format for static analysis tools

Florent florent.xicluna at gmail.com
Tue Apr 2 23:40:10 CEST 2013


Hello Vladimir,

I would like to give some information about what is already available
regarding some tools.

First, you might know that there's some effort to merge the output of
Pyflakes and Pep8 tools within Flake8.
Today Flake8 supports all the options of Pep8 (and can be extended for
plugins).
For example, a useful feature is to mimic the "pylint" format with `flake8
--format pylint`.

There's also a feature request which asks for JSON output for flake8.
https://bitbucket.org/tarek/flake8/issue/99

This is the current state for the Flake8 tool (and its libraries).
I don't know much about pylint and other tools.

-- 
Florent




2013/4/2 Vladimir Keleshev <vladimir at keleshev.com>

> Hi everyone,
>
> I'm very excited about the new mailing list. I wanted to share an old idea
> of mine, which is probably unoriginal, but can kick-start a discussion.
>
> What about all of our static analysis tools adopt a *common*
> machine-friendly error format, so that we could write editor plugins once,
> and then all of our tools would work interchangeably, and new tools could
> be adopted without need to update editor plugins.
>
> The proposed format could be triggered by a decided-upon option, e.g.
> --machine-friendly, with this usage-pattern:
>
>     usage: <tool> --machine-friendly <file>...
>
> The proposed format would consist of the following lines:
>
>
> </absolute/path/to/file>:<start-line>:<start-char>...<end-line>:<end-char>:
> <error-message>
>
> For example:
>
>     /home/username/git/project/project.py:65:4...65:7: Infinite `for` loop
>     /home/username/git/project/another.py:1:1...1:5: `re` imported, but
> not used
>
> This is very similar to what most static analysis tools (and compilers) do
> anyway. But it also adds <start-char> and <end-char> which allow for
> precise error-highlighting in the editor.
>
> What do you think?
>
> Best,
> Vladimir
>
> _______________________________________________
> code-quality mailing list
> code-quality at python.org
> http://mail.python.org/mailman/listinfo/code-quality
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/code-quality/attachments/20130402/65881c55/attachment-0001.html>


More information about the code-quality mailing list