MCPcopy Create free account
hub / github.com/alibaba/GraphScope / RemoveMultiLineComments

Function RemoveMultiLineComments

analytical_engine/misc/cpplint.py:1873–1886  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

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

Callers 1

ProcessFileDataFunction · 0.85

Tested by

no test coverage detected