Ejemplo n.º 1
0
std::list<Suppressions::SuppressionEntry> Suppressions::getUnmatchedGlobalSuppressions() const
{
    std::list<SuppressionEntry> r;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i) {
        // global suppressions..
        for (std::map<std::string, std::map<unsigned int, bool> >::const_iterator g = i->second._globs.begin(); g != i->second._globs.end(); ++g) {
            for (std::map<unsigned int, bool>::const_iterator l = g->second.begin(); l != g->second.end(); ++l) {
                if (!l->second) {
                    r.push_back(SuppressionEntry(i->first, g->first, l->first));
                }
            }
        }

        // unusedFunction..
        if (i->first == "unusedFunction") {
            for (std::map<std::string, std::map<unsigned int, bool> >::const_iterator f = i->second._files.begin(); f != i->second._files.end(); ++f) {
                for (std::map<unsigned int, bool>::const_iterator l = f->second.begin(); l != f->second.end(); ++l) {
                    if (!l->second) {
                        r.push_back(SuppressionEntry(i->first, f->first, l->first));
                    }
                }
            }
        }
    }
    return r;
}
Ejemplo n.º 2
0
std::list<Suppressions::SuppressionEntry> Suppressions::getUnmatchedLocalSuppressions(const std::string &file) const
{
    std::list<SuppressionEntry> r;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i) {
        std::map<std::string, std::map<unsigned int, bool> >::const_iterator f = i->second._files.find(file);
        if (f != i->second._files.end()) {
            for (std::map<unsigned int, bool>::const_iterator l = f->second.begin(); l != f->second.end(); ++l) {
                if (!l->second) {
                    r.push_back(SuppressionEntry(i->first, f->first, l->first));
                }
            }
        }
    }
    return r;
}
Ejemplo n.º 3
0
std::list<Settings::Suppressions::SuppressionEntry> Settings::Suppressions::getUnmatchedGlobalSuppressions() const
{
    std::list<SuppressionEntry> r;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i)
    {
        for (std::map<std::string, std::map<unsigned int, bool> >::const_iterator g = i->second._globs.begin(); g != i->second._globs.end(); ++g)
        {
            for (std::map<unsigned int, bool>::const_iterator l = g->second.begin(); l != g->second.end(); ++l)
            {
                if (!l->second)
                {
                    r.push_back(SuppressionEntry(i->first, g->first, l->first));
                }
            }
        }
    }
    return r;
}
Ejemplo n.º 4
0
std::list<Suppressions::SuppressionEntry> Suppressions::getUnmatchedGlobalSuppressions(const bool unusedFunctionChecking) const
{
    std::list<SuppressionEntry> result;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i) {
        if (!unusedFunctionChecking && i->first == "unusedFunction")
            continue;

        // global suppressions..
        for (std::map<std::string, std::map<unsigned int, bool> >::const_iterator g = i->second._globs.begin(); g != i->second._globs.end(); ++g) {
            for (std::map<unsigned int, bool>::const_iterator l = g->second.begin(); l != g->second.end(); ++l) {
                if (!l->second) {
                    result.push_back(SuppressionEntry(i->first, g->first, l->first));
                }
            }
        }
    }
    return result;
}
Ejemplo n.º 5
0
std::list<Suppressions::SuppressionEntry> Suppressions::getUnmatchedLocalSuppressions(const std::string &file, const bool unusedFunctionChecking) const
{
    std::list<SuppressionEntry> result;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i) {
        if (!unusedFunctionChecking && i->first == "unusedFunction")
            continue;

        std::map<std::string, std::map<unsigned int, bool> >::const_iterator f = i->second._files.find(Path::fromNativeSeparators(file));
        if (f != i->second._files.end()) {
            for (std::map<unsigned int, bool>::const_iterator l = f->second.begin(); l != f->second.end(); ++l) {
                if (!l->second) {
                    result.push_back(SuppressionEntry(i->first, f->first, l->first));
                }
            }
        }
    }
    return result;
}
Ejemplo n.º 6
0
std::list<Suppressions::SuppressionEntry> Suppressions::getUnmatchedLocalSuppressions(const std::string &file, bool unusedFunctionChecking) const
{
    (void)unusedFunctionChecking;
    std::list<SuppressionEntry> r;
    for (std::map<std::string, FileMatcher>::const_iterator i = _suppressions.begin(); i != _suppressions.end(); ++i) {
        if (i->first == "unusedFunction")
            continue;  // unusedFunction is not a "local" suppression

        std::map<std::string, std::map<unsigned int, bool> >::const_iterator f = i->second._files.find(file);
        if (f != i->second._files.end()) {
            for (std::map<unsigned int, bool>::const_iterator l = f->second.begin(); l != f->second.end(); ++l) {
                if (!l->second) {
                    r.push_back(SuppressionEntry(i->first, f->first, l->first));
                }
            }
        }
    }
    return r;
}