MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / RemoveMultiLineComments

Function RemoveMultiLineComments

src/tests/coding/cpplint.py:1869–1882  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

1867
1868
1869def RemoveMultiLineComments(filename, lines, error):
1870 """Removes multiline (c-style) comments from lines."""
1871 lineix = 0
1872 while lineix < len(lines):
1873 lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
1874 if lineix_begin >= len(lines):
1875 return
1876 lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
1877 if lineix_end >= len(lines):
1878 error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
1879 'Could not find end of multi-line comment')
1880 return
1881 RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
1882 lineix = lineix_end + 1
1883
1884
1885def CleanseComments(line):

Callers 1

ProcessFileDataFunction · 0.85

Tested by

no test coverage detected