summaryrefslogtreecommitdiff
path: root/HACKING.rst
diff options
context:
space:
mode:
authorGábor Antal <antal@inf.u-szeged.hu>2017-02-08 16:41:31 +0100
committerGábor Antal <antal@inf.u-szeged.hu>2017-02-10 15:09:37 +0100
commit51c6b1384760e7d07da5997b2afdbc292e1f637c (patch)
tree7a4fe9e3fd95eb60e182df2957526e23a3accd76 /HACKING.rst
parentd02d4b3f1b54eb4eba60daa9df2fd34a45766207 (diff)
downloadnova-51c6b1384760e7d07da5997b2afdbc292e1f637c.tar.gz
Enable global hacking checks and removed local checks
In this patchset, I set up 'enabled-extensions' in flake8 section of tox.ini. In newer hacking versions, we can enable some of the non-default hacking rules (one by one), which are disabled by default and implemented in the newer versions of hacking. The enabled extensions are the following: * [H106] Don’t put vim configuration in source files (off by default). * [H203] Use assertIs(Not)None to check for None (off by default). * [H904] Delay string interpolations at logging calls (off by default). Together with enabling these rules, I also removed the locally implemented versions of them. Due to limitations of local checking engine, there were some places in the tests, where pep8 failed. In this patchset, these codes are also fixed. Change-Id: I3a9d2dc007a269cdb2cad441e22f5eb9b58ce0a0
Diffstat (limited to 'HACKING.rst')
-rw-r--r--HACKING.rst4
1 files changed, 0 insertions, 4 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 1161a350cb..f0c4ccfbd8 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -21,13 +21,10 @@ Nova Specific Commandments
should be moved into a common module
- [N313] capitalize help string
Config parameter help strings should have a capitalized first letter
-- [N314] vim configuration should not be kept in source files.
- [N316] Change assertTrue(isinstance(A, B)) by optimal assert like
assertIsInstance(A, B).
- [N317] Change assertEqual(type(A), B) by optimal assert like
assertIsInstance(A, B)
-- [N318] Change assertEqual(A, None) or assertIs(A, None) to optimal assert
- like assertIsNone(A)
- [N319] Validate that debug level logs are not translated.
- [N320] Setting CONF.* attributes directly in tests is forbidden. Use
self.flags(option=value) instead.
@@ -64,7 +61,6 @@ Nova Specific Commandments
- [N351] Do not use the oslo_policy.policy.Enforcer.enforce() method.
- [N352] LOG.warn is deprecated. Enforce use of LOG.warning.
- [N353] Validate that context objects is not passed in logging calls.
-- [N354] String interpolation should be delayed at logging calls.
- [N355] Enforce use of assertTrue/assertFalse
- [N356] Enforce use of assertIs/assertIsNot
- [N357] Use oslo_utils.uuidutils or uuidsentinel(in case of test cases) to