neutron-lib/HACKING.rst
Boden R c61976b66d Use new checks in hacking 0.12
Neutron recently updated their usage of hacking to use
version 0.12 [1] that now contains the hacking check
check_delayed_string_interpolation who's off_by_default
value is initially True (i.e. disabled). This hacking check
is defined in neutron_lib, but hasn't been registered in our
factory and isn't being consumed directly [2].

This patch takes a simple approach to reusing openstack-dev
hacking checks:
- Removes all traces of neutron-lib's version of the check; no one is
using it [2].
- Bumps our version of hacking to use  0.12 so we can use the checks
in that release.
- Enables the check via enabled extensions in tox.ini as neutron did [1].
- Updates our hacking check usage, noting that adopters should
enable the same extensions we do (via tox.ini).

[1] https://review.openstack.org/#/c/394817/
[2] http://codesearch.openstack.org/?q=check_delayed_string_interpolation&i=nope&files=&repos=

Change-Id: Ie9448317855b9cba6092cd0f63b77d26a562a5c9
2016-12-15 07:03:58 -07:00

24 lines
1.0 KiB
ReStructuredText

neutron-lib Style Commandments
===============================================
- Step 1: Read the OpenStack Style Commandments
http://docs.openstack.org/developer/hacking/
- Step 2: Read on
Neutron Library Specific Commandments
-------------------------------------
- [N521] Validate that jsonutils module is used instead of json
- [N523] DEPRECATED. Enforce namespace-less imports for oslo libraries
- [N524] Prevent use of deprecated contextlib.nested.
- [N525] Python 3: Do not use xrange.
- [N526] Python 3: do not use basestring.
- [N527] Python 3: do not use dict.iteritems.
- [N529] Method's default argument shouldn't be mutable
- [N530] No importing of neutron; should be ignored in neutron itself
- [N531] Validate that LOG messages, except debug ones, have translations
- [N532] Validate that LOG.warning is used instead of LOG.warn. The latter is deprecated.
- [N533] Validate that debug level logs are not translated
- [N534] Exception messages should be translated
- [N535] Usage of Python eventlet module not allowed