MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / removecomments

Method removecomments

tools/reduce.py:138–142  ·  view source on GitHub ↗
(self, filedata)

Source from the content-addressed store, hash-verified

136 return filedata
137
138 def removecomments(self, filedata):
139 for i in range(len(filedata)):
140 line = filedata[i]
141 if '//' in line:
142 self.replaceandrun('remove comment', filedata, i, line[:line.find('//')].rstrip() + '\n')
143
144 def checkpar(self, line):
145 par = 0

Callers 2

mainFunction · 0.95
test_removecommentsFunction · 0.80

Calls 2

replaceandrunMethod · 0.95
findMethod · 0.45

Tested by 1

test_removecommentsFunction · 0.64