MCPcopy Create free account
hub / github.com/KDE/kdevelop / collectEnabledChecks

Method collectEnabledChecks

plugins/clangtidy/config/checkgroup.cpp:141–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void CheckGroup::collectEnabledChecks(QStringList& enabledChecks) const
142{
143 const auto effectiveGroupEnabledState = this->effectiveGroupEnabledState();
144
145 const bool appendGroupRule =
146 (!m_superGroup) ||
147 (m_superGroup->effectiveGroupEnabledState() != effectiveGroupEnabledState);
148 if (appendGroupRule) {
149 QString rule = wildCardText();
150 if (effectiveGroupEnabledState == CheckGroup::Disabled) {
151 rule.prepend(QLatin1Char('-'));
152 }
153 enabledChecks.append(rule);
154 }
155
156 for (const auto* subGroup : m_subGroups) {
157 subGroup->collectEnabledChecks(enabledChecks);
158 }
159
160 for (int i = 0; i < m_checks.size(); ++i) {
161 const auto effectiveCheckEnabledState = this->effectiveCheckEnabledState(i);
162 if (effectiveGroupEnabledState != effectiveCheckEnabledState) {
163 QString rule = m_checks.at(i);
164 if (effectiveCheckEnabledState == CheckGroup::Disabled) {
165 rule.prepend(QLatin1Char('-'));
166 }
167 enabledChecks.append(rule);
168 }
169 }
170}
171
172const QString& CheckGroup::prefix() const
173{

Callers

nothing calls this directly

Calls 5

appendMethod · 0.45
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected