diff options
| author | Jeremy Liu <liujiong@gohighsec.com> | 2016-11-24 14:25:42 +0800 |
|---|---|---|
| committer | Jeremy Liu <liujiong@gohighsec.com> | 2016-11-24 15:55:43 +0800 |
| commit | c756896e904c0ca48236bd4a9c08dff7fa1b4e86 (patch) | |
| tree | d25d68943954788f176525fb6312aabb924fc60b /kolla/hacking/checks.py | |
| parent | 390b4a24f83c10ea0845b0df58070d687eabe509 (diff) | |
| download | kolla-c756896e904c0ca48236bd4a9c08dff7fa1b4e86.tar.gz kolla-c756896e904c0ca48236bd4a9c08dff7fa1b4e86.zip | |
Add HACKING.rst and hacking test case.
Currently, we have hacking check in kolla, but no place where we
can define hacking check rules. This patch adds HACKING.rst file
for that. And also add test cases for hacking.
Change-Id: I87f8768138d91bf6a5a1db91d37392f794f3f0ba
Diffstat (limited to 'kolla/hacking/checks.py')
| -rw-r--r-- | kolla/hacking/checks.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kolla/hacking/checks.py b/kolla/hacking/checks.py index 9eba06c01..593b8bf83 100644 --- a/kolla/hacking/checks.py +++ b/kolla/hacking/checks.py @@ -21,16 +21,16 @@ def no_log_warn(logical_line): Deprecated LOG.warn(), instead use LOG.warning https://bugs.launchpad.net/senlin/+bug/1508442 - N352 + K302 """ - msg = ("N352: LOG.warn is deprecated, please use LOG.warning!") + msg = ("K302: LOG.warn is deprecated, please use LOG.warning!") if "LOG.warn(" in logical_line: yield (0, msg) def no_mutable_default_args(logical_line): - msg = "N301: Method's default argument shouldn't be mutable!" + msg = "K301: Method's default argument shouldn't be mutable!" if mutable_default_args.match(logical_line): yield (0, msg) |
