MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / RemoveMultiLineComments

Function RemoveMultiLineComments

rtpose_wrapper/scripts/cpp_lint.py:1151–1164  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

1149
1150
1151def RemoveMultiLineComments(filename, lines, error):
1152 """Removes multiline (c-style) comments from lines."""
1153 lineix = 0
1154 while lineix < len(lines):
1155 lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
1156 if lineix_begin >= len(lines):
1157 return
1158 lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
1159 if lineix_end >= len(lines):
1160 error(filename, lineix_begin + 1, 'readability/multiline_comment', 5,
1161 'Could not find end of multi-line comment')
1162 return
1163 RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
1164 lineix = lineix_end + 1
1165
1166
1167def CleanseComments(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls 4

errorFunction · 0.85

Tested by

no test coverage detected