[openstack-dev] [oslo] Proposal: add local hacking for oslo-incubator

ChangBo Guo glongwave at gmail.com
Mon May 5 15:02:29 UTC 2014


Hi Stackers,

I find some common code style would be avoided while I'm reviewing code ,so
think these check would
be nice to move into local hacking. The local hacking can ease reviewer
burden.

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

I just registered a blueprint for this in [3] and submit first patch in [4].

[3] https://blueprints.launchpad.net/oslo/+spec/oslo-local-hacking

[4] https://review.openstack.org/#/c/87832/<https://github.com/openstack/nova/blob/master/nova/hacking/checks.py>
Should we add local hacking for oslo-incubator ?  If yes, what's the other
check will be added ?
Your comment is appreciated :-)

-- 
ChangBo Guo(gcb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140505/061164f8/attachment.html>


More information about the OpenStack-dev mailing list