MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / isPathExcluded

Method isPathExcluded

context/IgnoreManager.cpp:87–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87bool IgnoreManager::isPathExcluded(const QString &path, const QStringList &patterns) const
88{
89 bool excluded = false;
90
91 for (const QString &pattern : patterns) {
92 if (pattern.isEmpty() || pattern.startsWith('#'))
93 continue;
94
95 bool isNegative = pattern.startsWith('!');
96 QString actualPattern = isNegative ? pattern.mid(1) : pattern;
97
98 bool matches = matchPathWithPattern(path, actualPattern);
99
100 if (matches) {
101 excluded = !isNegative;
102 }
103 }
104
105 return excluded;
106}
107
108bool IgnoreManager::matchPathWithPattern(const QString &path, const QString &pattern) const
109{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected