On Thu, Nov 20, 2014 at 9:49 AM, Sahid Orentino Ferdjaoui < sahid.ferdja...@redhat.com> wrote:
> This is something we can call nitpiking or low priority. > This all seems like nitpicking for very little value. I think there are better things we can be focusing on instead of thinking of new ways to nit pick. So I am -1 on all of these. > > I would like we introduce 3 new hacking rules to enforce the cohesion > and consistency in the base code. > > > Using boolean assertions > ------------------------ > > Some tests are written with equality assertions to validate boolean > conditions which is something not clean: > > assertFalse([]) asserts an empty list > assertEqual(False, []) asserts an empty list is equal to the boolean > value False which is something not correct. > > Some changes has been started here but still needs to be appreciated > by community: > > * https://review.openstack.org/#/c/133441/ > * https://review.openstack.org/#/c/119366/ > > > Using same order of arguments in equality assertions > ---------------------------------------------------- > > Most of the code is written with assertEqual(Expected, Observed) but > some part are still using the opposite. Even if they provide any real > optimisation using the same convention help reviewing and keep a > better consistency in the code. > > assertEqual(Expected, Observed) OK > assertEqual(Observed, Expected) KO > > A change has been started here but still needs to be appreciated by > community: > > * https://review.openstack.org/#/c/119366/ > > > Using LOG.warn instead of LOG.warning > ------------------------------------- > > We can see many time reviewers -1ed a patch to ask developer to use > 'warn' instead of 'warning'. This will provide no optimisation > but let's finally have something clear about what we have to use. > > LOG.warning: 74 > LOG.warn: 319 > > We probably want to use 'warn' > > Nothing has been started from what I know. > > > Thanks, > s. > > _______________________________________________ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev