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

Method check

tools/creduce.py:48–54  ·  view source on GitHub ↗
(self, equal_zero=False, result=1)

Source from the content-addressed store, hash-verified

46 self.add_command("grep -q -F {} {}".format(quote(text), file or '.tmp.output'))
47
48 def check(self, equal_zero=False, result=1):
49 op = 'eq' if equal_zero else 'ne'
50 cmds = ['RES=$?',
51 'if [ $RES -{} "0" ]; then'.format(op),
52 ' exit {}'.format(result),
53 'fi']
54 self.commands.extend(cmds)
55
56 def write(self, p):
57 write_to(p, self.commands)

Callers 1

creduce.pyFile · 0.45

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected