@@ 1562-1575 (lines=14) @@ | ||
1559 | lines[i] = '/**/' |
|
1560 | ||
1561 | ||
1562 | def RemoveMultiLineComments(filename, lines, error): |
|
1563 | """Removes multiline (c-style) comments from lines.""" |
|
1564 | lineix = 0 |
|
1565 | while lineix < len(lines): |
|
1566 | lineix_begin = FindNextMultiLineCommentStart(lines, lineix) |
|
1567 | if lineix_begin >= len(lines): |
|
1568 | return |
|
1569 | lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) |
|
1570 | if lineix_end >= len(lines): |
|
1571 | error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, |
|
1572 | 'Could not find end of multi-line comment') |
|
1573 | return |
|
1574 | RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) |
|
1575 | lineix = lineix_end + 1 |
|
1576 | ||
1577 | ||
1578 | def CleanseComments(line): |
@@ 1562-1575 (lines=14) @@ | ||
1559 | lines[i] = '/**/' |
|
1560 | ||
1561 | ||
1562 | def RemoveMultiLineComments(filename, lines, error): |
|
1563 | """Removes multiline (c-style) comments from lines.""" |
|
1564 | lineix = 0 |
|
1565 | while lineix < len(lines): |
|
1566 | lineix_begin = FindNextMultiLineCommentStart(lines, lineix) |
|
1567 | if lineix_begin >= len(lines): |
|
1568 | return |
|
1569 | lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) |
|
1570 | if lineix_end >= len(lines): |
|
1571 | error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, |
|
1572 | 'Could not find end of multi-line comment') |
|
1573 | return |
|
1574 | RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) |
|
1575 | lineix = lineix_end + 1 |
|
1576 | ||
1577 | ||
1578 | def CleanseComments(line): |