<div dir="ltr"><div>Hi Stackers,</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">I find some common code style would be avoided while I'm reviewing code ,so think these check would</span></div>
<div><span style="color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">be nice to move into local hacking. </span><span style="color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">The local hacking can ease reviewer burden.</span></div>
<p id="yui_3_10_3_1_1399300627459_1254" style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">The idea from keystone blueprint [1]. <br>
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:</p>
<p style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">- use import style 'from openstack.common.* import' not use 'import openstack.common.*'<br>
- assertIsNone should be used when using None with assertEqual<br>- _() should not be used in debug log statements<br>-do not use 'assertTrue(isinstance(a, b)) sentence'<br>-do not use 'assertEqual(type(A), B) sentence'</p>
<p id="yui_3_10_3_1_1399300627459_1255" style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">[1] <a rel="nofollow" href="https://blueprints.launchpad.net/keystone/+spec/more-code-style-automation" style="color:rgb(0,51,170);text-decoration:none">https://blueprints.launchpad.net/keystone/+spec/more-code-style-automation</a><br>
[2] <a rel="nofollow" href="https://github.com/openstack/nova/blob/master/nova/hacking/checks.py" style="color:rgb(0,51,170);text-decoration:none">https://github.com/openstack/nova/blob/master/nova/hacking/checks.py</a></p>
<p id="yui_3_10_3_1_1399300627459_1255" style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em;color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">I just registered a blueprint for this in [3] and submit first patch in [4].</p>
<p id="yui_3_10_3_1_1399300627459_1255" style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em"><span style="color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">[3] <a href="https://blueprints.launchpad.net/oslo/+spec/oslo-local-hacking">https://blueprints.launchpad.net/oslo/+spec/oslo-local-hacking</a></span></p>
<p id="yui_3_10_3_1_1399300627459_1255" style="margin:0px 0px 1.2em;padding:0px;width:auto;max-width:45em"><span style="color:rgb(51,51,51);font-family:sans-serif;font-size:12px;line-height:18px">[4] </span><a rel="nofollow" href="https://github.com/openstack/nova/blob/master/nova/hacking/checks.py" style="color:rgb(0,51,170);font-family:sans-serif;font-size:12px;line-height:18px;text-decoration:none">https://review.openstack.org/#/c/87832/</a></p>
Should we add local hacking for oslo-incubator ?  If yes, what's the other check will be added ?<div>Your comment is appreciated :-)<br clear="all"><div><div><br>-- <br><div dir="ltr"><div>ChangBo Guo(gcb)</div>
</div>
</div></div></div></div>