Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8265

Re: static analysis and other tools for checking Python code

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Jeremy Stanley <fungi@yuggoth.org>
Newsgroups linux.debian.maint.python
Subject Re: static analysis and other tools for checking Python code
Date Thu, 03 Mar 2016 01:40:02 +0100
Message-ID <r8pt8-7tT-5@gated-at.bofh.it> (permalink)
References <r85E5-1TO-1@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Mar 3 00:32:10 2016
Old-Return-Path <fungi@yuggoth.org>
X-Amavis-Spam-Status No, score=-7.006 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RP_MATCHES_RCVD=-0.006] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -6.1
X-Greylist delayed 2355 seconds by postgrey-1.35 at bendel; Thu, 03 Mar 2016 00:31:56 UTC
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23 (2014-03-12)
X-Sa-Exim-Connect-IP 2001:4802:7801:102:be76:4eff:fe20:63e0
X-Sa-Exim-Rcpt-To debian-python@lists.debian.org
X-Sa-Exim-Mail-From fungi@yuggoth.org
X-Sa-Exim-Scanned No (on azathoth.yuggoth.org); SAEximRunCond expanded to false
X-Mailing-List <debian-python@lists.debian.org> archive/latest/13591
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/20160302235234.GY2343@yuggoth.org
Approved robomod@news.nic.it
Lines 36
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 2 Mar 2016 23:52:34 +0000
X-Original-Message-ID <20160302235234.GY2343@yuggoth.org>
X-Original-References <CAKTje6Hjp+RA666ey=mi7mwsTnxOor2LS85pSU7krziM0Z6=Yw@mail.gmail.com>
Xref csiph.com linux.debian.maint.python:8265

Show key headers only | View raw


On 2016-03-02 11:22:52 +0800 (+0800), Paul Wise wrote:
[...]
> One of the things it has checks for is Python. So far it runs pyflakes
> and pep8 and a few hacky greps for some things that shouldn't be done
> in Python in my experience.
[...]

The "flake8" framework basically incorporates the pyflakes and pep8
analyzers along with a code complexity checker, and provides a
useful mechanism for controlling their behavior in a consistent
manner as well as pluggability to add your own:

    https://packages.debian.org/flake8

One flake8 plug-in which came out of the OpenStack developer
community is "hacking" (obviously not for every project, but an
interesting reference example of layering in your own style checks):

    https://packages.debian.org/python-hacking

Another output of the OpenStack community is "bandit," a security
analyzer for Python code:

    https://packages.debian.org/bandit

Some other interesting analyzers not yet packaged for Debian as far
as I can tell include "pep257" (a Python docstring checker) and
"clonedigger" (a DRYness checker).

    https://pypi.python.org/pypi/pep257
    https://pypi.python.org/pypi/clonedigger

I can probably think up more that I've used, but the above rise to
the top of my list.
-- 
Jeremy Stanley

Back to linux.debian.maint.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-02 04:30 +0100
  Re: static analysis and other tools for checking Python code Scott Kitterman <debian@kitterman.com> - 2016-03-02 05:40 +0100
    Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-02 06:00 +0100
  Re: static analysis and other tools for checking Python code Nicolas Chauvat <nicolas.chauvat@logilab.fr> - 2016-03-02 15:20 +0100
    Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-03 01:10 +0100
      Re: static analysis and other tools for checking Python code "Paul R. Tagliamonte" <paultag@gmail.com> - 2016-03-03 01:30 +0100
      Re: static analysis and other tools for checking Python code Nicolas Chauvat <nicolas.chauvat@logilab.fr> - 2016-03-03 13:00 +0100
        Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-04 06:10 +0100
          Re: static analysis and other tools for checking Python code Nicolas Chauvat <nicolas.chauvat@logilab.fr> - 2016-03-04 10:30 +0100
            Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-04 14:40 +0100
              Re: static analysis and other tools for checking Python code Nicolas Chauvat <nicolas.chauvat@logilab.fr> - 2016-03-04 16:20 +0100
                Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-05 04:20 +0100
                Re: static analysis and other tools for checking Python code Nicolas Chauvat <nicolas.chauvat@logilab.fr> - 2016-03-05 15:10 +0100
                Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-06 10:20 +0100
  Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-03 01:40 +0100
    Re: static analysis and other tools for checking Python code Jeremy Stanley <fungi@yuggoth.org> - 2016-03-03 01:50 +0100
    Re: static analysis and other tools for checking Python code Daniel Stender <stender@debian.org> - 2016-03-04 15:40 +0100
      Re: static analysis and other tools for checking Python code Paul Wise <pabs@debian.org> - 2016-03-05 04:10 +0100
  Re: static analysis and other tools for checking Python code Jeremy Stanley <fungi@yuggoth.org> - 2016-03-03 01:40 +0100

csiph-web