Opened 8 years ago

Closed 2 years ago

#2232 task closed fixed (fixed)

Tool for measuring coding standard conformance

Reported by: jml Owned by:
Priority: low Milestone: totally automated release infrastructure
Component: core Keywords:
Cc: therve, thijs Branch:
Author: Launchpad Bug:

Description

Like pyflakes, except for our coding standards.

Change History (6)

comment:1 Changed 8 years ago by exarkun

Things that can probably be implemented without a serious level of difficulty:

  • line length limits
  • # -*- test-case-name: ... -*- - okay, it isn't in the coding standard that modules need to start with this, but it should be.
  • Ditto for copyright statement
  • Whitespace around operators
  • four space indents
  • no tabs or trailing whitespace
  • no simple suites
  • no relative imports (is this actually possible?)
  • " or """ for docstrings
  • valid, parsable epytext
  • No __variables
  • No \-style line continuations

Harder things which might result in false positives:

  • docstrings on every module/function/class/method
  • StudlyCaps, camelCase, and auto_DISPATCH naming

What else?

comment:2 Changed 8 years ago by jml

  • It would be easy to check vertical whitespace.
  • Possibly some more sophisticated indentation checking (you know, for statements that span multiple lines)

comment:3 Changed 8 years ago by therve

  • Cc therve added

This is the kind of things pylint can do, with a little bit of configuration (OK, maybe a lot of configuration).

comment:4 Changed 4 years ago by <automation>

  • Owner jml deleted

comment:5 Changed 2 years ago by thijs

  • Cc thijs added
  • Milestone set to regular-releases

This has been implemented as tool called twistedchecker right..?

comment:6 Changed 2 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

Yes, thanks for noticing. Although twistedchecker definitely needs more work, it now exists as a real project on Launchpad - http://launchpad.net/twistedchecker - and bug reports and feature requests should be handled there.

Note: See TracTickets for help on using tickets.