Add local hacking for oslo-incubator

Registered by ChangBo Guo(gcb)

The idea from keystone blueprint [1].
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. The local hacking ease reviewer burden . This is the list of from [1][2] that would be nice to move into an automated check:

- use import style 'from openstack.common.* import' not use 'import openstack.common.*'
- assertIsNone should be used when using None with assertEqual
- _() should not be used in debug log statements
-do not use 'assertTrue(isinstance(a, b)) sentence'
-do not use 'assertEqual(type(A), B) sentence'

[1] https://blueprints.launchpad.net/keystone/+spec/more-code-style-automation
[2] https://github.com/openstack/nova/blob/master/nova/hacking/checks.py

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
ChangBo Guo(gcb)
Direction:
Needs approval
Assignee:
ChangBo Guo(gcb)
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/87832
    Add check import style hacking in gate

Addressed by: https://review.openstack.org/92309
    hacking:assertIsNone should be used when using None with assertEqual

Gerrit topic: https://review.openstack.org/#q,topic:bp/pep8-on-update,n,z

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.