[ovs-dev] [PATCH] checkpatch.py: Fix Python style.
Ben Pfaff
blp at ovn.org
Fri Jan 26 19:46:29 UTC 2018
Fixes the following warnings:
../utilities/checkpatch.py:219:1: E302 expected 2 blank lines, found 1
../utilities/checkpatch.py:224:1: E302 expected 2 blank lines, found 1
../utilities/checkpatch.py:228:1: E302 expected 2 blank lines, found 1
CC: Justin Pettit <jpettit at ovn.org>
Fixes: 4e99b70dfae0 ("checkpatch.py: Add check for "xxx" in comments.")
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
utilities/checkpatch.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 42777e6fcb15..8a3895240357 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -216,15 +216,18 @@ def is_comment_line(line):
"""Returns TRUE if the current line is part of a block comment."""
return __regex_is_comment_line.match(line) is not None
+
def has_comment(line):
"""Returns TRUE if the current line contains a comment or is part of
a block comment."""
return __regex_has_comment.match(line) is not None
+
def trailing_operator(line):
"""Returns TRUE if the current line ends with an operatorsuch as ? or :"""
return __regex_trailing_operator.match(line) is not None
+
def has_xxx_mark(line):
"""Returns TRUE if the current line contains 'xxx'."""
return __regex_has_xxx_mark.match(line) is not None
--
2.10.2
More information about the dev
mailing list