Skip to content

Commit

Permalink
tools: moveconfig: fix cleanup of defines across multiple lines
Browse files Browse the repository at this point in the history
Correct the clean-up of such defines that continue across multiple
lines, like follows:

  #define CONFIG_FOO "this continues to the next line " \
          "this line should be removed too" \
          "this line should be removed as well"

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
masahir0y authored and trini committed Aug 5, 2016
1 parent e9ea122 commit a3a779f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/moveconfig.py
Original file line number Diff line number Diff line change
@@ -408,6 +408,9 @@ def cleanup_one_header(header_path, patterns, options):

matched = []
for i, line in enumerate(lines):
if i - 1 in matched and lines[i - 1][-2:] == '\\\n':
matched.append(i)
continue
for pattern in patterns:
if pattern.search(line):
matched.append(i)

0 comments on commit a3a779f

Please sign in to comment.