MCPcopy Create free account
hub / github.com/BVLC/caffe / RemoveMultiLineComments

Function RemoveMultiLineComments

scripts/cpp_lint.py:1155–1168  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

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

Callers 1

ProcessFileDataFunction · 0.85

Tested by

no test coverage detected