Пример #1
0
static CppTools::ClangDiagnosticConfig createTidyClazyConfig()
{
    CppTools::ClangDiagnosticConfig config;
    config.setId("Test.ClangTidy");
    config.setDisplayName("Test");
    config.setIsReadOnly(true);
    config.setClangOptions(QStringList{QStringLiteral("-Wno-everything")});
    config.setClangTidyMode(CppTools::ClangDiagnosticConfig::TidyMode::ChecksPrefixList);
    config.setClangTidyChecks("modernize-*, misc-*");
    config.setClazyChecks("level2");
    return config;
}
static CppTools::ClangDiagnosticConfig
createConfigRepresentingGlobalSetting(const CppTools::ClangDiagnosticConfig &baseConfig)
{
    CppTools::ClangDiagnosticConfig config = baseConfig;
    config.setId(GLOBAL_PROXY_CONFIG_ID);

    QString displayName = config.displayName();
    if (config.isReadOnly())
        displayName = CppTools::ClangDiagnosticConfigsModel::displayNameWithBuiltinIndication(config);
    displayName = ClangProjectSettingsWidget::tr("Global setting (%1)").arg(displayName);

    config.setDisplayName(displayName);
    config.setIsReadOnly(true);

    return config;
}