MCPcopy Create free account
hub / github.com/apache/mesos / RemoveMultiLineComments

Function RemoveMultiLineComments

support/cpplint.py:1397–1410  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

1395
1396
1397def RemoveMultiLineComments(filename, lines, error):
1398 """Removes multiline (c-style) comments from lines."""
1399 lineix = 0
1400 while lineix < len(lines):
1401 lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
1402 if lineix_begin >= len(lines):
1403 return
1404 lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
1405 if lineix_end >= len(lines):
1406 error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
1407 'Could not find end of multi-line comment')
1408 return
1409 RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
1410 lineix = lineix_end + 1
1411
1412
1413def CleanseComments(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls 4

errorFunction · 0.85

Tested by

no test coverage detected