Add hacking to automate code styling

Registered by Sharat Sharma on 2017-01-11

Hacking is a great start at automating checks for common style issues. There are still lots of things that it is not checking for that it probably should. This is the list of things that would be nice to move into an automated check:

 - block comments should have a space after the # (this is already enforced for inline comments)
 - closing bracket must be in a separate line for multiline function calls
 - % should not be used in log statements
 - assertNone should be used when using None with assertEqual
 - spelling check for comments and docstrings
 - warn if children that change method signature of their parent
 - methods that just pass are useless and should be deleted
 - warn on try-except that just passes
 - enforce import ordering and spacing
 - _() should not be used in debug log statements
 - do not use dict.iteritems
- do not use dict.iterkeys
- do not use dict.itervalues
- do not use basestring

Blueprint information

Status:
Not started
Approver:
Renat Akhmerov
Priority:
Undefined
Drafter:
Sharat Sharma
Direction:
Needs approval
Assignee:
Sharat Sharma
Definition:
Pending Approval
Series goal:
Proposed for ocata
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/mistral-hacking,n,z

Addressed by: https://review.openstack.org/420405
    Enforce style check for assertIsNone

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.