import it.projectSearch.LeakProjectsPageTest;
import it.projectSearch.SearchProjectsTest;
import it.qualityProfile.OrganizationQualityProfilesPageTest;
+import it.qualityProfile.QualityProfilesBuiltInTest;
import it.uiExtension.OrganizationUiExtensionsTest;
import it.user.OrganizationIdentityProviderTest;
import org.junit.BeforeClass;
OrganizationQualityProfilesPageTest.class,
OrganizationTest.class,
OrganizationUiExtensionsTest.class,
+ QualityProfilesBuiltInTest.class,
BillingTest.class,
IssueTagsTest.class,
LeakProjectsPageTest.class,
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2017 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package it.qualityProfile;
+
+import com.sonar.orchestrator.Orchestrator;
+import it.Category6Suite;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
+import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.client.WsClient;
+import org.sonarqube.ws.client.organization.CreateWsRequest;
+import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
+
+import static it.Category6Suite.enableOrganizationsSupport;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.tuple;
+import static util.ItUtils.newAdminWsClient;
+import static util.ItUtils.newOrganizationKey;
+
+public class QualityProfilesBuiltInTest {
+
+ private static final String ANOTHER_ORGANIZATION = newOrganizationKey();
+ @ClassRule
+ public static Orchestrator orchestrator = Category6Suite.ORCHESTRATOR;
+ private static WsClient adminWsClient;
+
+ @BeforeClass
+ public static void setUp() {
+ enableOrganizationsSupport();
+ adminWsClient = newAdminWsClient(orchestrator);
+ }
+
+ @Test
+ public void xoo_profiles_provided() {
+ SearchWsResponse result = adminWsClient.qualityProfiles().search(new SearchWsRequest());
+
+ assertThat(result.getProfilesList())
+ .extracting(QualityProfile::getOrganization, QualityProfile::getName, QualityProfile::getLanguage, QualityProfile::getIsBuiltIn, QualityProfile::getIsDefault)
+ .containsExactlyInAnyOrder(
+ tuple("default-organization", "Basic", "xoo", true, true),
+ tuple("default-organization", "empty", "xoo", true, false),
+ tuple("default-organization", "Basic", "xoo2", true, true));
+ }
+
+ @Test
+ public void xoo_profiles_provided_copied_to_new_organization() {
+ adminWsClient.organizations().create(new CreateWsRequest.Builder()
+ .setKey(ANOTHER_ORGANIZATION)
+ .setName(ANOTHER_ORGANIZATION).build());
+ SearchWsResponse result = adminWsClient.qualityProfiles().search(new SearchWsRequest()
+ .setOrganizationKey(ANOTHER_ORGANIZATION));
+
+ assertThat(result.getProfilesList())
+ .extracting(QualityProfile::getOrganization, QualityProfile::getName, QualityProfile::getLanguage, QualityProfile::getIsBuiltIn, QualityProfile::getIsDefault)
+ .containsExactlyInAnyOrder(
+ tuple(ANOTHER_ORGANIZATION, "Basic", "xoo", true, true),
+ tuple(ANOTHER_ORGANIZATION, "empty", "xoo", true, false),
+ tuple(ANOTHER_ORGANIZATION, "Basic", "xoo2", true, true));
+ }
+}
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
-import javax.annotation.Nullable;
import org.sonar.api.resources.Languages;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService.NewAction;
import org.sonar.api.server.ws.WebService.NewController;
-import org.sonar.core.util.Protobuf;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
import org.sonar.db.organization.OrganizationDto;
import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse;
import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse.QualityProfile;
+import static org.sonar.core.util.Protobuf.setNullable;
import static org.sonar.server.ws.WsUtils.writeProtobuf;
public class InheritanceAction implements QProfileWsAction {
.setSince("5.2")
.setDescription("Show a quality profile's ancestors and children.")
.setHandler(this)
- .setResponseExample(getClass().getResource("example-inheritance.json"));
+ .setResponseExample(getClass().getResource("inheritance-example.json"));
QProfileWsSupport.createOrganizationParam(inheritance)
.setSince("6.4");
.build();
}
- private static QualityProfile buildProfile(RulesProfileDto profile, Statistics statistics) {
- return buildProfile(profile.getKey(), profile.getName(), profile.getParentKee(), statistics);
- }
-
private static Iterable<QualityProfile> buildAncestors(List<RulesProfileDto> ancestors, Statistics statistics) {
return ancestors.stream()
- .map(ancestor -> buildProfile(ancestor.getKey(), ancestor.getName(), ancestor.getParentKee(), statistics))
+ .map(ancestor -> buildProfile(ancestor, statistics))
.collect(Collectors.toList());
}
private static Iterable<QualityProfile> buildChildren(List<RulesProfileDto> children, Statistics statistics) {
return children.stream()
- .map(child -> buildProfile(child.getKey(), child.getName(), null, statistics))
+ .map(child -> buildProfile(child, statistics))
.collect(Collectors.toList());
}
- private static QualityProfile buildProfile(String key, String name, @Nullable String parentKey, Statistics statistics) {
+ private static QualityProfile buildProfile(RulesProfileDto qualityProfile, Statistics statistics) {
+ String key = qualityProfile.getKey();
QualityProfile.Builder builder = QualityProfile.newBuilder()
.setKey(key)
- .setName(name)
+ .setName(qualityProfile.getName())
.setActiveRuleCount(statistics.countRulesByProfileKey.getOrDefault(key, 0L))
- .setOverridingRuleCount(statistics.countOverridingRulesByProfileKey.getOrDefault(key, 0L));
- Protobuf.setNullable(parentKey, builder::setParent);
+ .setOverridingRuleCount(statistics.countOverridingRulesByProfileKey.getOrDefault(key, 0L))
+ .setIsBuiltIn(qualityProfile.isBuiltIn());
+ setNullable(qualityProfile.getParentKee(), builder::setParent);
return builder.build();
}
.prop("name", profile.getName())
.prop("lang", profile.getLanguage())
.prop("parentKey", profile.getParentKee())
+ .prop("isBuiltIn", profile.isBuiltIn())
.endObject();
}
}
+++ /dev/null
-{
- "profile": {
- "key": "AU-TpxcA-iU5OvuD2FL5",
- "name": "My BU Profile",
- "parent": "AU-TpxcA-iU5OvuD2FL2",
- "activeRuleCount": 3,
- "overridingRuleCount": 1
- },
- "ancestors": [
- {
- "key": "AU-TpxcA-iU5OvuD2FL1",
- "name": "My Company Profile",
- "parent": "xoo-my-group-profile-01234",
- "activeRuleCount": 3
- },
- {
- "key": "AU-TpxcA-iU5OvuD2FL0",
- "name": "My Group Profile",
- "activeRuleCount": 2
- }
- ],
- "children": [
- {
- "key": "AU-TpxcB-iU5OvuD2FL6",
- "name": "For Project One",
- "activeRuleCount": 5
- },
- {
- "key": "AU-TpxcB-iU5OvuD2FL7",
- "name": "For Project Two",
- "activeRuleCount": 4,
- "overridingRuleCount": 1
- }
- ]
-}
--- /dev/null
+{
+ "profile": {
+ "key": "AU-TpxcA-iU5OvuD2FL5",
+ "name": "My BU Profile",
+ "parent": "AU-TpxcA-iU5OvuD2FL2",
+ "activeRuleCount": 3,
+ "overridingRuleCount": 1,
+ "isBuiltIn": false
+ },
+ "ancestors": [
+ {
+ "key": "AU-TpxcA-iU5OvuD2FL1",
+ "name": "My Company Profile",
+ "parent": "xoo-my-group-profile-01234",
+ "activeRuleCount": 3,
+ "isBuiltIn": false
+ },
+ {
+ "key": "AU-TpxcA-iU5OvuD2FL0",
+ "name": "Sonar way",
+ "activeRuleCount": 2,
+ "isBuiltIn": true
+ }
+ ],
+ "children": [
+ {
+ "key": "AU-TpxcB-iU5OvuD2FL6",
+ "name": "For Project One",
+ "activeRuleCount": 5,
+ "isBuiltIn": false
+ },
+ {
+ "key": "AU-TpxcB-iU5OvuD2FL7",
+ "name": "For Project Two",
+ "activeRuleCount": 4,
+ "overridingRuleCount": 1,
+ "isBuiltIn": false
+ }
+ ]
+}
{
"canWrite": false,
"qualityprofiles": [
- {
- "key": "cs-c-qp-for-sonarsource-73109",
- "name": "C# QP for SonarSource",
- "lang": "cs"
- },
- {
- "key": "java-default-with-mojo-conventions-49307",
- "name": "Default - Maven Conventions",
- "lang": "java",
- "parentKey": "java-top-profile-without-formatting-conventions-50037"
- },
- {
- "key": "java-default-with-sonarsource-conventions-27339",
- "name": "Default - SonarSource conventions",
- "lang": "java",
- "parentKey": "java-top-profile-without-formatting-conventions-50037"
- },
{
"key": "java-top-profile-without-formatting-conventions-50037",
"name": "Default - Top",
- "lang": "java"
- },
- {
- "key": "php-drupal-15274",
- "name": "Drupal",
- "lang": "php"
- },
- {
- "key": "java-findbugs-14954",
- "name": "FindBugs",
- "lang": "java"
- },
- {
- "key": "java-findbugs-security-audit-88783",
- "name": "FindBugs Security Audit",
- "lang": "java"
- },
- {
- "key": "java-findbugs-security-minimal-21735",
- "name": "FindBugs Security Minimal",
- "lang": "java"
- },
- {
- "key": "java-for-sq-java-plugin-only-92289",
- "name": "For Java and JavaScript Plugins",
"lang": "java",
- "parentKey": "java-default-with-sonarsource-conventions-27339"
- },
- {
- "key": "java-for-sq-only-95381",
- "name": "For SQ Only",
- "lang": "java",
- "parentKey": "java-default-with-sonarsource-conventions-27339"
- },
- {
- "key": "php-psr-2-06315",
- "name": "PSR-2",
- "lang": "php"
- },
- {
- "key": "js-sonarsource-javascript-conventions-62984",
- "name": "SonarSource JavaScript Conventions",
- "lang": "js",
- "parentKey": "js-sonar-way"
- },
- {
- "key": "c-sonar-way",
- "name": "Sonar way",
- "lang": "c"
- },
- {
- "key": "cpp-sonar-way",
- "name": "Sonar way",
- "lang": "cpp"
- },
- {
- "key": "cs-sonar-way-94087",
- "name": "Sonar way",
- "lang": "cs"
- },
- {
- "key": "grvy-sonar-way-06443",
- "name": "Sonar way",
- "lang": "grvy"
+ "isBuiltIn": false
},
{
"key": "java-sonar-way-80423",
"name": "Sonar way",
- "lang": "java"
+ "lang": "java",
+ "isBuiltIn": true
},
{
"key": "js-sonar-way",
"name": "Sonar way",
- "lang": "js"
- },
- {
- "key": "objc-sonar-way-10164",
- "name": "Sonar way",
- "lang": "objc"
+ "lang": "js",
+ "isBuiltIn": true
},
{
"key": "php-sonar-way-05548",
"name": "Sonar way",
- "lang": "php"
- },
- {
- "key": "java-without-findbugs",
- "name": "Without Findbugs",
- "lang": "java"
+ "lang": "php",
+ "isBuiltIn": true
}
],
"languages": {
- "c": "C",
- "cpp": "C++",
- "objc": "Objective-C",
"js": "JavaScript",
- "cs": "C#",
- "grvy": "Groovy",
"java": "Java",
"php": "PHP"
},
"name": "Clirr",
"language": "java"
},
- {
- "key": "grvy",
- "name": "CodeNarc",
- "language": "grvy"
- },
- {
- "key": "common-c",
- "name": "Common SonarQube",
- "language": "c"
- },
- {
- "key": "common-cpp",
- "name": "Common SonarQube",
- "language": "cpp"
- },
- {
- "key": "common-cs",
- "name": "Common SonarQube",
- "language": "cs"
- },
- {
- "key": "common-grvy",
- "name": "Common SonarQube",
- "language": "grvy"
- },
{
"key": "common-java",
"name": "Common SonarQube",
"name": "Common SonarQube",
"language": "js"
},
- {
- "key": "common-objc",
- "name": "Common SonarQube",
- "language": "objc"
- },
{
"key": "common-php",
"name": "Common SonarQube",
"language": "php"
},
- {
- "key": "c-cppcheck",
- "name": "Cppcheck",
- "language": "c"
- },
- {
- "key": "cpp-cppcheck",
- "name": "Cppcheck",
- "language": "cpp"
- },
- {
- "key": "fxcop",
- "name": "FxCop / Code Analysis",
- "language": "cs"
- },
- {
- "key": "resharper-cs",
- "name": "ReSharper",
- "language": "cs"
- },
- {
- "key": "resharper-vbnet",
- "name": "ReSharper",
- "language": "vbnet"
- },
- {
- "key": "c",
- "name": "SonarQube",
- "language": "c"
- },
- {
- "key": "cpp",
- "name": "SonarQube",
- "language": "cpp"
- },
- {
- "key": "csharpsquid",
- "name": "SonarQube",
- "language": "cs"
- },
{
"key": "javascript",
"name": "SonarQube",
"language": "js"
},
- {
- "key": "objc",
- "name": "SonarQube",
- "language": "objc"
- },
{
"key": "php",
"name": "SonarQube",
"key": "squid",
"name": "SonarQube",
"language": "java"
- },
- {
- "key": "stylecop",
- "name": "StyleCop",
- "language": "cs"
}
],
"statuses": {
"key": "TRANSPORTABILITY",
"name": "Transportability",
"parent": "REUSABILITY"
- },
- {
- "key": "PORTABILITY",
- "name": "Portability"
- },
- {
- "key": "COMPILER_RELATED_PORTABILITY",
- "name": "Compiler",
- "parent": "PORTABILITY"
- },
- {
- "key": "HARDWARE_RELATED_PORTABILITY",
- "name": "Hardware",
- "parent": "PORTABILITY"
- },
- {
- "key": "LANGUAGE_RELATED_PORTABILITY",
- "name": "Language",
- "parent": "PORTABILITY"
- },
- {
- "key": "OS_RELATED_PORTABILITY",
- "name": "OS",
- "parent": "PORTABILITY"
- },
- {
- "key": "PORTABILITY_COMPLIANCE",
- "name": "Portability Compliance",
- "parent": "PORTABILITY"
- },
- {
- "key": "SOFTWARE_RELATED_PORTABILITY",
- "name": "Software",
- "parent": "PORTABILITY"
- },
- {
- "key": "TIME_ZONE_RELATED_PORTABILITY",
- "name": "Time zone",
- "parent": "PORTABILITY"
- },
- {
- "key": "MAINTAINABILITY",
- "name": "Maintainability"
- },
- {
- "key": "MAINTAINABILITY_COMPLIANCE",
- "name": "Maintainability Compliance",
- "parent": "MAINTAINABILITY"
- },
- {
- "key": "READABILITY",
- "name": "Readability",
- "parent": "MAINTAINABILITY"
- },
- {
- "key": "UNDERSTANDABILITY",
- "name": "Understandability",
- "parent": "MAINTAINABILITY"
- },
- {
- "key": "SECURITY",
- "name": "Security"
- },
- {
- "key": "API_ABUSE",
- "name": "API abuse",
- "parent": "SECURITY"
- },
- {
- "key": "ERRORS",
- "name": "Errors",
- "parent": "SECURITY"
- },
- {
- "key": "INPUT_VALIDATION_AND_REPRESENTATION",
- "name": "Input validation and representation",
- "parent": "SECURITY"
- },
- {
- "key": "SECURITY_COMPLIANCE",
- "name": "Security Compliance",
- "parent": "SECURITY"
- },
- {
- "key": "SECURITY_FEATURES",
- "name": "Security features",
- "parent": "SECURITY"
- },
- {
- "key": "USABILITY",
- "name": "Usability"
- },
- {
- "key": "USABILITY_ACCESSIBILITY",
- "name": "Accessibility",
- "parent": "USABILITY"
- },
- {
- "key": "USABILITY_EASE_OF_USE",
- "name": "Ease of Use",
- "parent": "USABILITY"
- },
- {
- "key": "USABILITY_COMPLIANCE",
- "name": "Usability Compliance",
- "parent": "USABILITY"
- },
- {
- "key": "EFFICIENCY",
- "name": "Efficiency"
- },
- {
- "key": "EFFICIENCY_COMPLIANCE",
- "name": "Efficiency Compliance",
- "parent": "EFFICIENCY"
- },
- {
- "key": "MEMORY_EFFICIENCY",
- "name": "Memory use",
- "parent": "EFFICIENCY"
- },
- {
- "key": "NETWORK_USE",
- "name": "Network use",
- "parent": "EFFICIENCY"
- },
- {
- "key": "CPU_EFFICIENCY",
- "name": "Processor use",
- "parent": "EFFICIENCY"
- },
- {
- "key": "CHANGEABILITY",
- "name": "Changeability"
- },
- {
- "key": "ARCHITECTURE_CHANGEABILITY",
- "name": "Architecture",
- "parent": "CHANGEABILITY"
- },
- {
- "key": "CHANGEABILITY_COMPLIANCE",
- "name": "Changeability Compliance",
- "parent": "CHANGEABILITY"
- },
- {
- "key": "DATA_CHANGEABILITY",
- "name": "Data",
- "parent": "CHANGEABILITY"
- },
- {
- "key": "LOGIC_CHANGEABILITY",
- "name": "Logic",
- "parent": "CHANGEABILITY"
- },
- {
- "key": "RELIABILITY",
- "name": "Reliability"
- },
- {
- "key": "ARCHITECTURE_RELIABILITY",
- "name": "Architecture",
- "parent": "RELIABILITY"
- },
- {
- "key": "DATA_RELIABILITY",
- "name": "Data",
- "parent": "RELIABILITY"
- },
- {
- "key": "EXCEPTION_HANDLING",
- "name": "Exception handling",
- "parent": "RELIABILITY"
- },
- {
- "key": "FAULT_TOLERANCE",
- "name": "Fault tolerance",
- "parent": "RELIABILITY"
- },
- {
- "key": "INSTRUCTION_RELIABILITY",
- "name": "Instruction",
- "parent": "RELIABILITY"
- },
- {
- "key": "LOGIC_RELIABILITY",
- "name": "Logic",
- "parent": "RELIABILITY"
- },
- {
- "key": "RELIABILITY_COMPLIANCE",
- "name": "Reliability Compliance",
- "parent": "RELIABILITY"
- },
- {
- "key": "RESOURCE_RELIABILITY",
- "name": "Resource",
- "parent": "RELIABILITY"
- },
- {
- "key": "SYNCHRONIZATION_RELIABILITY",
- "name": "Synchronization",
- "parent": "RELIABILITY"
- },
- {
- "key": "UNIT_TESTS",
- "name": "Unit tests coverage",
- "parent": "RELIABILITY"
- },
- {
- "key": "TESTABILITY",
- "name": "Testability"
- },
- {
- "key": "INTEGRATION_TESTABILITY",
- "name": "Integration level",
- "parent": "TESTABILITY"
- },
- {
- "key": "TESTABILITY_COMPLIANCE",
- "name": "Testability Compliance",
- "parent": "TESTABILITY"
- },
- {
- "key": "UNIT_TESTABILITY",
- "name": "Unit level",
- "parent": "TESTABILITY"
}
]
}
import org.sonar.server.organization.TestDefaultOrganizationProvider;
import org.sonar.server.qualityprofile.QProfileLookup;
import org.sonar.server.qualityprofile.QProfileName;
-import org.sonar.server.qualityprofile.QProfileTesting;
import org.sonar.server.qualityprofile.RuleActivation;
import org.sonar.server.qualityprofile.RuleActivator;
import org.sonar.server.qualityprofile.RuleActivatorContextFactory;
import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.sonar.server.qualityprofile.QProfileTesting.newQProfileDto;
import static org.sonarqube.ws.MediaTypes.PROTOBUF;
public class InheritanceActionTest {
RuleDefinitionDto rule3 = createRule("xoo", "rule3");
/*
- * groupWide (2) <- companyWide (2) <- buWide (2, 1 overriding) <- (forProject1 (2), forProject2 (2))
+ * sonar way (2) <- companyWide (2) <- buWide (2, 1 overriding) <- (forProject1 (2), forProject2 (2))
*/
- RulesProfileDto groupWide = createProfile("xoo", "My Group Profile", "xoo-my-group-profile-01234");
- createActiveRule(rule1, groupWide);
- createActiveRule(rule2, groupWide);
+ RulesProfileDto sonarway = dbTester.qualityProfiles().insertQualityProfile(
+ newQProfileDto(organization, QProfileName.createFor("xoo", "Sonar way"), "xoo-sonar-way").setIsBuiltIn(true));
+ createActiveRule(rule1, sonarway);
+ createActiveRule(rule2, sonarway);
dbSession.commit();
activeRuleIndexer.index();
RulesProfileDto companyWide = createProfile("xoo", "My Company Profile", "xoo-my-company-profile-12345");
- setParent(groupWide, companyWide);
+ setParent(sonarway, companyWide);
RulesProfileDto buWide = createProfile("xoo", "My BU Profile", "xoo-my-bu-profile-23456");
setParent(companyWide, buWide);
}
private RulesProfileDto createProfile(String lang, String name, String key) {
- RulesProfileDto profile = QProfileTesting.newQProfileDto(organization, new QProfileName(lang, name), key);
+ RulesProfileDto profile = newQProfileDto(organization, new QProfileName(lang, name), key);
dbClient.qualityProfileDao().insert(dbSession, profile);
dbSession.commit();
return profile;
" {" +
" \"key\": \"XOO_P1\"," +
" \"name\": \"P1\"," +
- " \"lang\": \"xoo\"" +
+ " \"lang\": \"xoo\"," +
+ " \"isBuiltIn\": true" +
" }," +
" {" +
" \"key\": \"XOO_P2\"," +
" \"name\": \"P2\"," +
" \"lang\": \"xoo\"," +
- " \"parentKey\": \"XOO_P1\"" +
+ " \"parentKey\": \"XOO_P1\"," +
+ " \"isBuiltIn\": false" +
" }" +
" ]" +
"}");
}
private void insertQualityProfiles(OrganizationDto organization) {
- RulesProfileDto profile1 = QProfileTesting.newXooP1(organization);
+ RulesProfileDto profile1 = QProfileTesting.newXooP1(organization).setIsBuiltIn(true);
RulesProfileDto profile2 = QProfileTesting.newXooP2(organization).setParentKee(QProfileTesting.XOO_P1_KEY);
db.getDbClient().qualityProfileDao().insert(db.getSession(), profile1);
db.getDbClient().qualityProfileDao().insert(db.getSession(), profile2);
{
"profile": {
- "key": "xoo-my-bu-profile-23456", "name": "My BU Profile", "parent": "xoo-my-company-profile-12345",
- "activeRuleCount": 2, "overridingRuleCount": 1
+ "key": "xoo-my-bu-profile-23456",
+ "name": "My BU Profile",
+ "parent": "xoo-my-company-profile-12345",
+ "activeRuleCount": 2,
+ "overridingRuleCount": 1,
+ "isBuiltIn": false
},
"ancestors": [
- {"key": "xoo-my-company-profile-12345", "name": "My Company Profile", "parent": "xoo-my-group-profile-01234", "activeRuleCount": 2},
- {"key": "xoo-my-group-profile-01234", "name": "My Group Profile", "activeRuleCount": 2}
+ {
+ "key": "xoo-my-company-profile-12345",
+ "name": "My Company Profile",
+ "parent": "xoo-sonar-way",
+ "activeRuleCount": 2,
+ "isBuiltIn": false
+ },
+ {
+ "key": "xoo-sonar-way",
+ "name": "Sonar way",
+ "activeRuleCount": 2,
+ "isBuiltIn": true
+ }
],
"children": [
- {"key": "xoo-for-project-one-34567", "name": "For Project One", "activeRuleCount": 3},
- {"key": "xoo-for-project-two-45678", "name": "For Project Two", "activeRuleCount": 2, "overridingRuleCount": 1}
+ {
+ "key": "xoo-for-project-one-34567",
+ "name": "For Project One",
+ "activeRuleCount": 3,
+ "isBuiltIn": false
+ },
+ {
+ "key": "xoo-for-project-two-45678",
+ "name": "For Project Two",
+ "activeRuleCount": 2,
+ "overridingRuleCount": 1,
+ "isBuiltIn": false
+ }
]
}
optional Infos infos = 7;
optional Warnings warnings = 8;
optional string organization = 9;
- optional bool isBuiltIn = 10;
message Infos {
repeated string infos = 1;
optional string parent = 3;
optional int64 activeRuleCount = 4;
optional int64 overridingRuleCount = 5;
+ optional bool isBuiltIn = 6;
}
}