Skip to content

Commit

Permalink
Warn if help text is empty
Browse files Browse the repository at this point in the history
Personal pet peeve. Should add a warning to the C implementation too.
  • Loading branch information
ulfalizer committed Jan 29, 2018
1 parent 797221c commit 60d1291
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kconfiglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1771,13 +1771,19 @@ def _parse_properties(self, node, visible_if_deps):
break

if not line:
self._warn("{} has 'help' but empty help text"
.format(_name_and_loc_str(node.item)))

node.help = ""
break

indent = _indentation(line)
if indent == 0:
# If the first non-empty lines has zero indent, there is no
# help text
self._warn("{} has 'help' but empty help text"
.format(_name_and_loc_str(node.item)))

node.help = ""
self._saved_line = line # "Unget" the line
break
Expand Down

0 comments on commit 60d1291

Please sign in to comment.