'Verify that each rule and each exclusion has the right number of tests
that applies to it. TODO: Also check that each target has the right
number of tests. In particular left-wildcard targets should have at least
three tests. Right-wildcard targets should have at least ten tests.
Returns an array of strings reporting any coverage problems if they exist,
or empty list if coverage is sufficient.'

def getCoverageProblems(self):

    problems = self._determineTestApplication()
    for rule in self.rules:
        needed_count = (1 + len(regex.findall('[+*?|]', rule.fromPattern)))
        needed_count = (needed_count - len(regex.findall('\\(\\?:', rule.fromPattern)))
        needed_count = (needed_count - len(regex.findall('\\(\\?!', rule.fromPattern)))
        needed_count = (needed_count - len(regex.findall('\\(\\?=', rule.fromPattern)))
        needed_count = (needed_count - len(regex.findall('\\?', rule.fromPattern)))
        actual_count = len(rule.tests)
        if (actual_count < needed_count):
            problems.append(('%s:    Not    enough    tests    (%d    vs    %s)    for    %s' % (self.filename, actual_count, needed_count, rule)))
            pass
    for exclusion in self.exclusions:
        needed_count = (1 + len(regex.findall('[+*?|]', exclusion.exclusionPattern)))
        needed_count = (needed_count - len(regex.findall('\\(\\?:', exclusion.exclusionPattern)))
        needed_count = (needed_count - len(regex.findall('\\?', rule.fromPattern)))
        actual_count = len(exclusion.tests)
        if (actual_count < needed_count):
            problems.append(('%s:    Not    enough    tests    (%d    vs    %s)    for    %s' % (self.filename, actual_count, needed_count, exclusion)))
    return problems
