]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16598 Rename generic concept to education principles
authorPierre <pierre.guillot@sonarsource.com>
Fri, 8 Jul 2022 14:28:19 +0000 (16:28 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 12 Jul 2022 14:30:04 +0000 (14:30 +0000)
27 files changed:
build.gradle
plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/XooRulesDefinition.java
server/sonar-db-dao/src/main/java/org/sonar/db/rule/RuleDto.java
server/sonar-db-dao/src/main/resources/org/sonar/db/rule/RuleMapper.xml
server/sonar-db-dao/src/schema/schema-sq.ddl
server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDaoTest.java
server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleTesting.java
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTable.java [new file with mode: 0644]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTable.java [deleted file]
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/DbVersion96.java
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest.java [new file with mode: 0644]
server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest.java [deleted file]
server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest/schema.sql [new file with mode: 0644]
server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest/schema.sql [deleted file]
server/sonar-webserver-core/src/main/java/org/sonar/server/rule/RegisterRules.java
server/sonar-webserver-core/src/test/java/org/sonar/server/rule/RegisterRulesTest.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RuleMapper.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/RulesWsParameters.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/SearchAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/rule/ws/ShowAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/CurrentAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/user/ws/DismissNoticeAction.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/SearchActionTest.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/rule/ws/ShowActionTest.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/user/ws/DismissNoticeActionTest.java
sonar-ws/src/main/protobuf/ws-rules.proto

index eb7be4f63b3129f3b432fb5a0955995ce424c4db..9339b64e526a587c4697158bdf437ee9f7158d19 100644 (file)
@@ -178,7 +178,7 @@ subprojects {
       dependency 'org.sonarsource.kotlin:sonar-kotlin-plugin:2.9.0.1147'
       dependency 'org.sonarsource.slang:sonar-ruby-plugin:1.9.0.3429'
       dependency 'org.sonarsource.slang:sonar-scala-plugin:1.9.0.3429'
-      dependency 'org.sonarsource.api.plugin:sonar-plugin-api:9.8.0.196'
+      dependency 'org.sonarsource.api.plugin:sonar-plugin-api:9.8.0.203'
       dependency 'org.sonarsource.xml:sonar-xml-plugin:2.5.0.3376'
       dependency 'org.sonarsource.iac:sonar-iac-plugin:1.7.0.2012'
       dependency 'org.sonarsource.text:sonar-text-plugin:1.1.0.282'
index 17860487d381ad00626096fe99ffec7e1f741d0d..245478876325a32b074bbf730584fd5ea794480d 100644 (file)
@@ -120,7 +120,7 @@ public class XooRulesDefinition implements RulesDefinition {
     oneIssuePerLine
       .setDebtRemediationFunction(oneIssuePerLine.debtRemediationFunctions().linear("1min"))
       .setGapDescription("It takes about 1 minute to an experienced software craftsman to remove a line of code")
-      .addGenericConceptKeys("defense_in_depth", "least_trust_principle");
+      .addEducationPrincipleKeys("defense_in_depth", "least_trust_principle");
 
     NewRule oneQuickFixPerLine = repo.createRule(OneQuickFixPerLineSensor.RULE_KEY).setName("One Quick Fix Per Line")
       .setTags("line");
index c3809c2ded6bbaa3cb1bdcf5cedf21dc5e1ea6d7..79446dc84b64d66404b43a4ab1dbc8a6d60a4e2e 100644 (file)
@@ -60,7 +60,7 @@ public class RuleDto {
   private String ruleKey = null;
 
   private final Set<RuleDescriptionSectionDto> ruleDescriptionSectionDtos = new HashSet<>();
-  private String genericConceptsField = null;
+  private String educationPrinciplesField = null;
 
   /**
    * Description format can be null on external rule, otherwise it should never be null
@@ -237,12 +237,12 @@ public class RuleDto {
     return Objects.equals(contextKey, otherContextKey);
   }
 
-  public Set<String> getGenericConcepts() {
-    return deserializeStringSet(genericConceptsField);
+  public Set<String> getEducationPrinciples() {
+    return deserializeStringSet(educationPrinciplesField);
   }
 
-  public RuleDto setGenericConcepts(Set<String> genericConcepts){
-    this.genericConceptsField = serializeStringSet(genericConcepts);
+  public RuleDto setEducationPrinciples(Set<String> educationPrinciples){
+    this.educationPrinciplesField = serializeStringSet(educationPrinciples);
     return this;
   }
 
index 4ccbfe936519d4afbd43d716837229ea8d02e1fb..fcd120cd8b5269384c7d28947c4fc6380a6cdbbe 100644 (file)
@@ -39,7 +39,7 @@
     r.ad_hoc_description as "adHocDescription",
     r.ad_hoc_severity as "adHocSeverity",
     r.ad_hoc_type as "adHocType",
-    r.generic_concepts as "genericConceptsField"
+    r.education_principles as "educationPrinciplesField"
   </sql>
 
   <sql id="leftOuterJoinRulesDescriptionSections">
       ad_hoc_description,
       ad_hoc_severity,
       ad_hoc_type,
-      generic_concepts,
+      education_principles,
       created_at,
       updated_at
     )
       #{adHocDescription,jdbcType=CLOB},
       #{adHocSeverity,jdbcType=VARCHAR},
       #{adHocType,jdbcType=TINYINT},
-      #{genericConceptsField,jdbcType=VARCHAR},
+      #{educationPrinciplesField,jdbcType=VARCHAR},
       #{createdAt,jdbcType=BIGINT},
       #{updatedAt,jdbcType=BIGINT}
     )
       ad_hoc_description=#{adHocDescription,jdbcType=CLOB},
       ad_hoc_severity=#{adHocSeverity,jdbcType=VARCHAR},
       ad_hoc_type=#{adHocType,jdbcType=TINYINT},
-      generic_concepts=#{genericConceptsField,jdbcType=VARCHAR},
+      education_principles=#{educationPrinciplesField,jdbcType=VARCHAR},
       updated_at=#{updatedAt,jdbcType=BIGINT}
     where
       uuid=#{uuid,jdbcType=VARCHAR}
index 4c236994232ab45747d2d818f58e3f2677ef9ce2..a9cfa3c66ad6cf892df8cb8e0bd6d68b4afecce9 100644 (file)
@@ -865,7 +865,7 @@ CREATE TABLE "RULES"(
     "AD_HOC_DESCRIPTION" CHARACTER LARGE OBJECT,
     "AD_HOC_SEVERITY" CHARACTER VARYING(10),
     "AD_HOC_TYPE" TINYINT,
-    "GENERIC_CONCEPTS" CHARACTER VARYING(255)
+    "EDUCATION_PRINCIPLES" CHARACTER VARYING(255)
 );
 ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("UUID");
 CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY" NULLS FIRST, "PLUGIN_NAME" NULLS FIRST);
index c26aea06e5708065bb39a2b8fbab7f084e9d2d19..706fefe8adfa25c542adf3ec645400509cf46db4 100644 (file)
@@ -237,7 +237,7 @@ public class RuleDaoTest {
     assertThat(actual.getAdHocType()).isEqualTo(expected.getAdHocType());
     assertThat(actual.getRuleDescriptionSectionDtos()).usingRecursiveFieldByFieldElementComparator()
       .containsExactlyInAnyOrderElementsOf(expected.getRuleDescriptionSectionDtos());
-    assertThat(actual.getGenericConcepts()).isEqualTo(expected.getGenericConcepts());
+    assertThat(actual.getEducationPrinciples()).isEqualTo(expected.getEducationPrinciples());
   }
 
   @Test
index 87e7ed0dde571b933947fde0946ded984eb623e4..9fd58793de78b9c9c9928d68b81bed75c5c21faf 100644 (file)
@@ -119,7 +119,7 @@ public class RuleTesting {
       .setCreatedAt(currentTimeMillis)
       .setUpdatedAt(currentTimeMillis + 5)
       .setScope(Scope.MAIN)
-      .setGenericConcepts(Set.of(randomAlphanumeric(5), randomAlphanumeric(5)));
+      .setEducationPrinciples(Set.of(randomAlphanumeric(5), randomAlphanumeric(5)));
   }
 
   public static RuleParamDto newRuleParam(RuleDto rule) {
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTable.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTable.java
new file mode 100644 (file)
index 0000000..fccc049
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 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 org.sonar.server.platform.db.migration.version.v96;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.db.DatabaseUtils;
+import org.sonar.server.platform.db.migration.sql.AddColumnsBuilder;
+import org.sonar.server.platform.db.migration.step.DdlChange;
+
+import static org.sonar.server.platform.db.migration.def.VarcharColumnDef.newVarcharColumnDefBuilder;
+
+public class AddEducationPrinciplesColumnToRuleTable extends DdlChange {
+
+  static final String COLUMN_EDUCATION_PRINCIPLES_KEY = "education_principles";
+
+  static final String RULE_TABLE = "rules";
+
+  public AddEducationPrinciplesColumnToRuleTable(Database db) {
+    super(db);
+  }
+
+  @Override
+  public void execute(DdlChange.Context context) throws SQLException {
+    try (Connection connection = getDatabase().getDataSource().getConnection()) {
+      if (!DatabaseUtils.tableColumnExists(connection, RULE_TABLE, COLUMN_EDUCATION_PRINCIPLES_KEY)) {
+        context.execute(new AddColumnsBuilder(getDialect(), RULE_TABLE)
+          .addColumn(newVarcharColumnDefBuilder().setColumnName(COLUMN_EDUCATION_PRINCIPLES_KEY).setIsNullable(true).setLimit(255).build())
+          .build());
+      }
+    }
+  }
+
+}
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTable.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTable.java
deleted file mode 100644 (file)
index 5011ca6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 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 org.sonar.server.platform.db.migration.version.v96;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import org.sonar.db.Database;
-import org.sonar.db.DatabaseUtils;
-import org.sonar.server.platform.db.migration.sql.AddColumnsBuilder;
-import org.sonar.server.platform.db.migration.step.DdlChange;
-
-import static org.sonar.server.platform.db.migration.def.VarcharColumnDef.newVarcharColumnDefBuilder;
-
-public class AddGenericConceptsColumnToRuleTable extends DdlChange {
-
-  static final String COLUMN_GENERIC_CONCEPTS_KEY = "generic_concepts";
-
-  static final String RULE_TABLE = "rules";
-
-  public AddGenericConceptsColumnToRuleTable(Database db) {
-    super(db);
-  }
-
-  @Override
-  public void execute(DdlChange.Context context) throws SQLException {
-    try (Connection connection = getDatabase().getDataSource().getConnection()) {
-      if (!DatabaseUtils.tableColumnExists(connection, RULE_TABLE, COLUMN_GENERIC_CONCEPTS_KEY)) {
-        context.execute(new AddColumnsBuilder(getDialect(), RULE_TABLE)
-          .addColumn(newVarcharColumnDefBuilder().setColumnName(COLUMN_GENERIC_CONCEPTS_KEY).setIsNullable(true).setLimit(255).build())
-          .build());
-      }
-    }
-  }
-
-}
index faa531201a417898b0deed32c318a81df52b1d82..5a473258ad5c28a1118a7c52b1788814548c181d 100644 (file)
@@ -33,7 +33,7 @@ public class DbVersion96 implements DbVersion {
       .add(6503, "Create unique uniq_rule_desc_sections", CreateIndexForRuleDescSections.class)
       .add(6504, "Add column 'expiration_date' to 'user_tokens'", AddExpirationDateColumnToUserTokens.class)
       .add(6505, "Add column 'rule_description_context_key' to 'issues'", AddRuleDescriptionContextKeyInIssuesTable.class)
-      .add(6506, "Add column 'generic_concepts' to 'rules'", AddGenericConceptsColumnToRuleTable.class)
+      .add(6506, "Add column 'education_principles' to 'rules'", AddEducationPrinciplesColumnToRuleTable.class)
     ;
   }
 }
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest.java
new file mode 100644 (file)
index 0000000..e296073
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 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 org.sonar.server.platform.db.migration.version.v96;
+
+import java.sql.SQLException;
+import java.sql.Types;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonar.db.CoreDbTester;
+
+import static org.sonar.db.CoreDbTester.createForSchema;
+import static org.sonar.server.platform.db.migration.version.v96.AddEducationPrinciplesColumnToRuleTable.COLUMN_EDUCATION_PRINCIPLES_KEY;
+import static org.sonar.server.platform.db.migration.version.v96.AddEducationPrinciplesColumnToRuleTable.RULE_TABLE;
+
+public class AddEducationPrinciplesColumnToRuleTableTest {
+  @Rule
+  public final CoreDbTester db = createForSchema(AddEducationPrinciplesColumnToRuleTableTest.class, "schema.sql");
+
+  private final AddEducationPrinciplesColumnToRuleTable addEducationPrinciplesColumnToRuleTable = new AddEducationPrinciplesColumnToRuleTable(db.database());
+
+  @Test
+  public void column_education_principles_should_be_added() throws SQLException {
+    db.assertColumnDoesNotExist(RULE_TABLE, COLUMN_EDUCATION_PRINCIPLES_KEY);
+
+    addEducationPrinciplesColumnToRuleTable.execute();
+
+    db.assertColumnDefinition(RULE_TABLE, COLUMN_EDUCATION_PRINCIPLES_KEY, Types.VARCHAR, 255, true);
+  }
+
+  @Test
+  public void migration_should_be_reentrant() throws SQLException {
+    db.assertColumnDoesNotExist(RULE_TABLE, COLUMN_EDUCATION_PRINCIPLES_KEY);
+
+    addEducationPrinciplesColumnToRuleTable.execute();
+    addEducationPrinciplesColumnToRuleTable.execute();
+
+    db.assertColumnDefinition(RULE_TABLE, COLUMN_EDUCATION_PRINCIPLES_KEY, Types.VARCHAR, 255, true);
+  }
+}
diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest.java
deleted file mode 100644 (file)
index 4bcc490..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 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 org.sonar.server.platform.db.migration.version.v96;
-
-import java.sql.SQLException;
-import java.sql.Types;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonar.db.CoreDbTester;
-
-import static org.sonar.db.CoreDbTester.createForSchema;
-import static org.sonar.server.platform.db.migration.version.v96.AddGenericConceptsColumnToRuleTable.COLUMN_GENERIC_CONCEPTS_KEY;
-import static org.sonar.server.platform.db.migration.version.v96.AddGenericConceptsColumnToRuleTable.RULE_TABLE;
-
-public class AddGenericConceptsColumnToRuleTableTest {
-  @Rule
-  public final CoreDbTester db = createForSchema(AddGenericConceptsColumnToRuleTableTest.class, "schema.sql");
-
-  private final AddGenericConceptsColumnToRuleTable addGenericConceptsColumnToRuleTable = new AddGenericConceptsColumnToRuleTable(db.database());
-
-  @Test
-  public void column_generic_concepts_should_be_added() throws SQLException {
-    db.assertColumnDoesNotExist(RULE_TABLE, COLUMN_GENERIC_CONCEPTS_KEY);
-
-    addGenericConceptsColumnToRuleTable.execute();
-
-    db.assertColumnDefinition(RULE_TABLE, COLUMN_GENERIC_CONCEPTS_KEY, Types.VARCHAR, 255, true);
-  }
-
-  @Test
-  public void migration_should_be_reentrant() throws SQLException {
-    db.assertColumnDoesNotExist(RULE_TABLE, COLUMN_GENERIC_CONCEPTS_KEY);
-
-    addGenericConceptsColumnToRuleTable.execute();
-    addGenericConceptsColumnToRuleTable.execute();
-
-    db.assertColumnDefinition(RULE_TABLE, COLUMN_GENERIC_CONCEPTS_KEY, Types.VARCHAR, 255, true);
-  }
-}
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddEducationPrinciplesColumnToRuleTableTest/schema.sql
new file mode 100644 (file)
index 0000000..8346f94
--- /dev/null
@@ -0,0 +1,40 @@
+CREATE TABLE "RULES"(
+    "UUID" CHARACTER VARYING(40) NOT NULL,
+    "NAME" CHARACTER VARYING(200),
+    "PLUGIN_RULE_KEY" CHARACTER VARYING(200) NOT NULL,
+    "PLUGIN_KEY" CHARACTER VARYING(200),
+    "PLUGIN_CONFIG_KEY" CHARACTER VARYING(200),
+    "PLUGIN_NAME" CHARACTER VARYING(255) NOT NULL,
+    "SCOPE" CHARACTER VARYING(20) NOT NULL,
+    "PRIORITY" INTEGER,
+    "STATUS" CHARACTER VARYING(40),
+    "LANGUAGE" CHARACTER VARYING(20),
+    "DEF_REMEDIATION_FUNCTION" CHARACTER VARYING(20),
+    "DEF_REMEDIATION_GAP_MULT" CHARACTER VARYING(20),
+    "DEF_REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20),
+    "GAP_DESCRIPTION" CHARACTER VARYING(4000),
+    "SYSTEM_TAGS" CHARACTER VARYING(4000),
+    "IS_TEMPLATE" BOOLEAN DEFAULT FALSE NOT NULL,
+    "DESCRIPTION_FORMAT" CHARACTER VARYING(20),
+    "RULE_TYPE" TINYINT,
+    "SECURITY_STANDARDS" CHARACTER VARYING(4000),
+    "IS_AD_HOC" BOOLEAN NOT NULL,
+    "IS_EXTERNAL" BOOLEAN NOT NULL,
+    "CREATED_AT" BIGINT,
+    "UPDATED_AT" BIGINT,
+    "TEMPLATE_UUID" CHARACTER VARYING(40),
+    "NOTE_DATA" CHARACTER LARGE OBJECT,
+    "NOTE_USER_UUID" CHARACTER VARYING(255),
+    "NOTE_CREATED_AT" BIGINT,
+    "NOTE_UPDATED_AT" BIGINT,
+    "REMEDIATION_FUNCTION" CHARACTER VARYING(20),
+    "REMEDIATION_GAP_MULT" CHARACTER VARYING(20),
+    "REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20),
+    "TAGS" CHARACTER VARYING(4000),
+    "AD_HOC_NAME" CHARACTER VARYING(200),
+    "AD_HOC_DESCRIPTION" CHARACTER LARGE OBJECT,
+    "AD_HOC_SEVERITY" CHARACTER VARYING(10),
+    "AD_HOC_TYPE" TINYINT
+);
+ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("UUID");
+CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY" NULLS FIRST, "PLUGIN_NAME" NULLS FIRST);
diff --git a/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest/schema.sql b/server/sonar-db-migration/src/test/resources/org/sonar/server/platform/db/migration/version/v96/AddGenericConceptsColumnToRuleTableTest/schema.sql
deleted file mode 100644 (file)
index 8346f94..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-CREATE TABLE "RULES"(
-    "UUID" CHARACTER VARYING(40) NOT NULL,
-    "NAME" CHARACTER VARYING(200),
-    "PLUGIN_RULE_KEY" CHARACTER VARYING(200) NOT NULL,
-    "PLUGIN_KEY" CHARACTER VARYING(200),
-    "PLUGIN_CONFIG_KEY" CHARACTER VARYING(200),
-    "PLUGIN_NAME" CHARACTER VARYING(255) NOT NULL,
-    "SCOPE" CHARACTER VARYING(20) NOT NULL,
-    "PRIORITY" INTEGER,
-    "STATUS" CHARACTER VARYING(40),
-    "LANGUAGE" CHARACTER VARYING(20),
-    "DEF_REMEDIATION_FUNCTION" CHARACTER VARYING(20),
-    "DEF_REMEDIATION_GAP_MULT" CHARACTER VARYING(20),
-    "DEF_REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20),
-    "GAP_DESCRIPTION" CHARACTER VARYING(4000),
-    "SYSTEM_TAGS" CHARACTER VARYING(4000),
-    "IS_TEMPLATE" BOOLEAN DEFAULT FALSE NOT NULL,
-    "DESCRIPTION_FORMAT" CHARACTER VARYING(20),
-    "RULE_TYPE" TINYINT,
-    "SECURITY_STANDARDS" CHARACTER VARYING(4000),
-    "IS_AD_HOC" BOOLEAN NOT NULL,
-    "IS_EXTERNAL" BOOLEAN NOT NULL,
-    "CREATED_AT" BIGINT,
-    "UPDATED_AT" BIGINT,
-    "TEMPLATE_UUID" CHARACTER VARYING(40),
-    "NOTE_DATA" CHARACTER LARGE OBJECT,
-    "NOTE_USER_UUID" CHARACTER VARYING(255),
-    "NOTE_CREATED_AT" BIGINT,
-    "NOTE_UPDATED_AT" BIGINT,
-    "REMEDIATION_FUNCTION" CHARACTER VARYING(20),
-    "REMEDIATION_GAP_MULT" CHARACTER VARYING(20),
-    "REMEDIATION_BASE_EFFORT" CHARACTER VARYING(20),
-    "TAGS" CHARACTER VARYING(4000),
-    "AD_HOC_NAME" CHARACTER VARYING(200),
-    "AD_HOC_DESCRIPTION" CHARACTER LARGE OBJECT,
-    "AD_HOC_SEVERITY" CHARACTER VARYING(10),
-    "AD_HOC_TYPE" TINYINT
-);
-ALTER TABLE "RULES" ADD CONSTRAINT "PK_RULES" PRIMARY KEY("UUID");
-CREATE UNIQUE INDEX "RULES_REPO_KEY" ON "RULES"("PLUGIN_RULE_KEY" NULLS FIRST, "PLUGIN_NAME" NULLS FIRST);
index b7324ab3a3ab04c44967e98b34587d03ef764e39..d5898eb455de62d8a216b7f899beeb518315ae3b 100644 (file)
@@ -397,7 +397,7 @@ public class RegisterRules implements Startable {
       .setIsAdHoc(false)
       .setCreatedAt(system2.now())
       .setUpdatedAt(system2.now())
-      .setGenericConcepts(ruleDef.genericConceptKeys());
+      .setEducationPrinciples(ruleDef.educationPrincipleKeys());
 
     if (isNotEmpty(ruleDef.htmlDescription())) {
       ruleDto.setDescriptionFormat(Format.HTML);
@@ -443,8 +443,8 @@ public class RegisterRules implements Startable {
     boolean debtDefinitionsMerged = mergeDebtDefinitions(ruleDef, ruleDto);
     boolean tagsMerged = mergeTags(ruleDef, ruleDto);
     boolean securityStandardsMerged = mergeSecurityStandards(ruleDef, ruleDto);
-    boolean genericConceptsMerged = mergeGenericConcepts(ruleDef, ruleDto);
-    return ruleMerged || debtDefinitionsMerged || tagsMerged || securityStandardsMerged || genericConceptsMerged;
+    boolean educationPrinciplesMerged = mergeEducationPrinciples(ruleDef, ruleDto);
+    return ruleMerged || debtDefinitionsMerged || tagsMerged || securityStandardsMerged || educationPrinciplesMerged;
   }
 
   private boolean mergeRule(RulesDefinition.Rule def, RuleDto dto) {
@@ -683,11 +683,11 @@ public class RegisterRules implements Startable {
     return changed;
   }
 
-  private static boolean mergeGenericConcepts(RulesDefinition.Rule ruleDef, RuleDto dto) {
+  private static boolean mergeEducationPrinciples(RulesDefinition.Rule ruleDef, RuleDto dto) {
     boolean changed = false;
-    if (dto.getGenericConcepts().size() != ruleDef.genericConceptKeys().size() ||
-      !dto.getGenericConcepts().containsAll(ruleDef.genericConceptKeys())) {
-      dto.setGenericConcepts(ruleDef.genericConceptKeys());
+    if (dto.getEducationPrinciples().size() != ruleDef.educationPrincipleKeys().size() ||
+      !dto.getEducationPrinciples().containsAll(ruleDef.educationPrincipleKeys())) {
+      dto.setEducationPrinciples(ruleDef.educationPrincipleKeys());
       changed = true;
     }
     return changed;
index 164949cb9e44d69223f967812efd923ff4ef0b85..58e48f4d2cc8565266c14c3f4bc0f33423f1f4cb 100644 (file)
@@ -244,7 +244,7 @@ public class RegisterRulesTest {
     assertThat(rule.getType()).isEqualTo(RuleType.CODE_SMELL.getDbConstant());
     assertThat(rule.getPluginKey()).isEqualTo(FAKE_PLUGIN_KEY);
     assertThat(rule.isAdHoc()).isFalse();
-    assertThat(rule.getGenericConcepts()).containsOnly("concept1", "concept2", "concept3");
+    assertThat(rule.getEducationPrinciples()).containsOnly("concept1", "concept2", "concept3");
   }
 
   @Test
@@ -414,7 +414,7 @@ public class RegisterRulesTest {
     assertThat(rule1.getType()).isEqualTo(RuleType.BUG.getDbConstant());
     assertThat(rule1.getCreatedAt()).isEqualTo(DATE1.getTime());
     assertThat(rule1.getUpdatedAt()).isEqualTo(DATE2.getTime());
-    assertThat(rule1.getGenericConcepts()).containsOnly("concept1","concept4");
+    assertThat(rule1.getEducationPrinciples()).containsOnly("concept1","concept4");
   }
 
   @Test
@@ -1209,7 +1209,7 @@ public class RegisterRulesTest {
         .setType(RuleType.CODE_SMELL)
         .setStatus(RuleStatus.BETA)
         .setGapDescription("java.S115.effortToFix")
-        .addGenericConceptKeys("concept1", "concept2", "concept3");
+        .addEducationPrincipleKeys("concept1", "concept2", "concept3");
       rule1.setDebtRemediationFunction(rule1.debtRemediationFunctions().linearWithOffset("5d", "10h"));
 
       rule1.createParam("param1").setDescription("parameter one").setDefaultValue("default1");
@@ -1248,7 +1248,7 @@ public class RegisterRulesTest {
         .setType(RuleType.BUG)
         .setStatus(READY)
         .setGapDescription("java.S115.effortToFix.v2")
-        .addGenericConceptKeys("concept1", "concept4");
+        .addEducationPrincipleKeys("concept1", "concept4");
       rule1.setDebtRemediationFunction(rule1.debtRemediationFunctions().linearWithOffset("6d", "2h"));
       rule1.createParam("param1").setDescription("parameter one v2").setDefaultValue("default1 v2");
       rule1.createParam("param2").setDescription("parameter two v2").setDefaultValue("default2 v2");
@@ -1288,7 +1288,7 @@ public class RegisterRulesTest {
         .setScope(RuleScope.ALL)
         .setType(RuleType.CODE_SMELL)
         .setStatus(RuleStatus.BETA)
-        .addGenericConceptKeys("concept1", "concept2", "concept3");
+        .addEducationPrincipleKeys("concept1", "concept2", "concept3");
 
       repo.createRule(EXTERNAL_HOTSPOT_RULE_KEY.rule())
         .setName("Hotspot")
index 856833ccf5243439a8e07e81200bb43fc26c9006..fa8f88e538268f96c32189323185eb04694e6e6d 100644 (file)
@@ -59,9 +59,9 @@ import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_DEFAULT_DEBT_REM_
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_DEFAULT_REM_FUNCTION;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_DEPRECATED_KEYS;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_DESCRIPTION_SECTIONS;
+import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_EDUCATION_PRINCIPLES;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_EFFORT_TO_FIX_DESCRIPTION;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_GAP_DESCRIPTION;
-import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_GENERIC_CONCEPTS;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_HTML_DESCRIPTION;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_INTERNAL_KEY;
 import static org.sonar.server.rule.ws.RulesWsParameters.FIELD_IS_EXTERNAL;
@@ -148,7 +148,7 @@ public class RuleMapper {
       setAdHocSeverity(ruleResponse, ruleDto, fieldsToReturn);
       setAdHocType(ruleResponse, ruleDto);
     }
-    setGenericConcepts(ruleResponse, ruleDto, fieldsToReturn);
+    setEducationPrinciples(ruleResponse, ruleDto, fieldsToReturn);
     return ruleResponse;
   }
 
@@ -199,9 +199,9 @@ public class RuleMapper {
     }
   }
 
-  private static void setGenericConcepts(Rules.Rule.Builder ruleResponse, RuleDto ruleDto, Set<String> fieldsToReturn) {
-    if (shouldReturnField(fieldsToReturn, FIELD_GENERIC_CONCEPTS)) {
-      ruleResponse.getGenericConceptsBuilder().addAllGenericConcepts((ruleDto.getGenericConcepts()));
+  private static void setEducationPrinciples(Rules.Rule.Builder ruleResponse, RuleDto ruleDto, Set<String> fieldsToReturn) {
+    if (shouldReturnField(fieldsToReturn, FIELD_EDUCATION_PRINCIPLES)) {
+      ruleResponse.getEducationPrinciplesBuilder().addAllEducationPrinciples((ruleDto.getEducationPrinciples()));
     }
   }
 
index 4f4af555c87752bc8c3ef348740e9ff1ffda2524..4177350ac28deca960eba78e48a87702ddcae5bb 100644 (file)
@@ -62,7 +62,7 @@ public class RulesWsParameters {
   public static final String FIELD_MARKDOWN_DESCRIPTION = "mdDesc";
 
   public static final String FIELD_DESCRIPTION_SECTIONS = "descriptionSections";
-  public static final String FIELD_GENERIC_CONCEPTS = "genericConcepts";
+  public static final String FIELD_EDUCATION_PRINCIPLES = "educationPrinciples";
   public static final String FIELD_NOTE_LOGIN = "noteLogin";
   public static final String FIELD_MARKDOWN_NOTE = "mdNote";
   public static final String FIELD_HTML_NOTE = "htmlNote";
@@ -110,7 +110,7 @@ public class RulesWsParameters {
     FIELD_MARKDOWN_DESCRIPTION, FIELD_DESCRIPTION_SECTIONS, FIELD_NOTE_LOGIN, FIELD_MARKDOWN_NOTE, FIELD_HTML_NOTE,
     FIELD_DEFAULT_DEBT_REM_FUNCTION, FIELD_EFFORT_TO_FIX_DESCRIPTION, FIELD_DEBT_OVERLOADED, FIELD_DEBT_REM_FUNCTION,
     FIELD_DEFAULT_REM_FUNCTION, FIELD_GAP_DESCRIPTION, FIELD_REM_FUNCTION_OVERLOADED, FIELD_REM_FUNCTION,
-    FIELD_PARAMS, FIELD_ACTIVES, FIELD_SCOPE, FIELD_DEPRECATED_KEYS, FIELD_GENERIC_CONCEPTS);
+    FIELD_PARAMS, FIELD_ACTIVES, FIELD_SCOPE, FIELD_DEPRECATED_KEYS, FIELD_EDUCATION_PRINCIPLES);
 
   private RulesWsParameters() {
     // prevent instantiation
index 31db2ae17a7ad2ff416a587733deae9e730a2133..016d1da1236379e997d8ea8d06710a4c62eba12a 100644 (file)
@@ -152,7 +152,7 @@ public class SearchAction implements RulesWsAction {
         new Change("9.5", "The field 'descriptionSections' has been added to the payload"),
         new Change("9.5", "The field 'descriptionSections' has been added to the 'f' parameter"),
         new Change("9.6", "'descriptionSections' can optionally embed a context field"),
-        new Change("9.6", "The field 'genericConcepts' has been added to the 'f' parameter")
+        new Change("9.6", "The field 'educationPrinciples' has been added to the 'f' parameter")
       );
 
     action.createParam(FACETS)
index 1e5afdb58f91b3c5040f597218968190506ff41a..ab44840e7f76e3c96864a18e0648405b3a62d2cd 100644 (file)
@@ -80,7 +80,7 @@ public class ShowAction implements RulesWsAction {
         new Change("9.5", "The field 'descriptionSections' has been added to the payload"),
         new Change("9.5", "The field 'descriptionSections' has been added to the 'f' parameter"),
         new Change("9.6", "'descriptionSections' can optionally embed a context field"),
-        new Change("9.6", "'genericConcepts' has been added")
+        new Change("9.6", "'educationPrinciples' has been added")
       );
 
     action
index 4b956f4d8941ade11e9eda619db541c0b2806f2e..9721fad227753ad045b141075eea8373c6906390 100644 (file)
@@ -50,7 +50,7 @@ import static java.util.Optional.ofNullable;
 import static java.util.stream.Collectors.toList;
 import static org.apache.commons.lang.StringUtils.EMPTY;
 import static org.sonar.api.web.UserRole.USER;
-import static org.sonar.server.user.ws.DismissNoticeAction.GENERIC_CONCEPTS;
+import static org.sonar.server.user.ws.DismissNoticeAction.EDUCATION_PRINCIPLES;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 import static org.sonarqube.ws.Users.CurrentWsResponse.HomepageType.APPLICATION;
 import static org.sonarqube.ws.Users.CurrentWsResponse.HomepageType.PORTFOLIO;
@@ -123,7 +123,7 @@ public class CurrentAction implements UsersWsAction {
       .setHomepage(buildHomepage(dbSession, user))
       .setUsingSonarLintConnectedMode(user.getLastSonarlintConnectionDate() != null)
       .setSonarLintAdSeen(user.isSonarlintAdSeen())
-      .putDismissedNotices(GENERIC_CONCEPTS, isNoticeDismissed(user, GENERIC_CONCEPTS));
+      .putDismissedNotices(EDUCATION_PRINCIPLES, isNoticeDismissed(user, EDUCATION_PRINCIPLES));
     ofNullable(emptyToNull(user.getEmail())).ifPresent(builder::setEmail);
     ofNullable(emptyToNull(user.getEmail())).ifPresent(u -> builder.setAvatar(avatarResolver.create(user)));
     ofNullable(user.getExternalLogin()).ifPresent(builder::setExternalIdentity);
index 57b14f5902463f19c4276e7be7f5a8e643532165..d4625ffb21eb5dffc86f4383260afe7270b6ff12 100644 (file)
@@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkState;
 
 public class DismissNoticeAction implements UsersWsAction {
 
-  public static final String GENERIC_CONCEPTS = "genericConcepts";
+  public static final String EDUCATION_PRINCIPLES = "educationPrinciples";
   public static final String USER_DISMISS_CONSTANT = "user.dismissedNotices.";
 
   private final UserSession userSession;
@@ -54,8 +54,8 @@ public class DismissNoticeAction implements UsersWsAction {
 
     action.createParam("notice")
       .setDescription("notice key to dismiss")
-      .setExampleValue(GENERIC_CONCEPTS)
-      .setPossibleValues(GENERIC_CONCEPTS);
+      .setExampleValue(EDUCATION_PRINCIPLES)
+      .setPossibleValues(EDUCATION_PRINCIPLES);
   }
 
   @Override
index bdc2bf3c09ac81400308cb454ef83cb8a0246bfb..12de1415f02f3f1beeb644a1767edd7da35b9750 100644 (file)
@@ -309,7 +309,7 @@ public class SearchActionTest {
     indexRules();
 
     Rules.SearchResponse response = ws.newRequest()
-      .setParam(WebService.Param.FIELDS, "createdAt,langName,genericConcepts")
+      .setParam(WebService.Param.FIELDS, "createdAt,langName,educationPrinciples")
       .executeProtobuf(Rules.SearchResponse.class);
     Rules.Rule result = response.getRules(0);
 
@@ -320,7 +320,7 @@ public class SearchActionTest {
     // selected fields
     assertThat(result.getCreatedAt()).isNotEmpty();
     assertThat(result.getLangName()).isNotEmpty();
-    assertThat(result.getGenericConcepts().getGenericConceptsList()).containsExactlyElementsOf(rule.getGenericConcepts());
+    assertThat(result.getEducationPrinciples().getEducationPrinciplesList()).containsExactlyElementsOf(rule.getEducationPrinciples());
 
     // not returned fields
     assertThat(result.hasEffortToFixDescription()).isFalse();
index 8e6590dee747f59826c0638a753138a83aa59793..2cfd6cbe5018411c4ffe6b1771c30e537c162571 100644 (file)
@@ -130,7 +130,7 @@ public class ShowActionTest {
     assertThat(resultRule.getParams().getParamsList())
       .extracting(Rule.Param::getKey, Rule.Param::getHtmlDesc, Rule.Param::getDefaultValue)
       .containsExactlyInAnyOrder(tuple(ruleParam.getName(), ruleParam.getDescription(), ruleParam.getDefaultValue()));
-    assertThat(resultRule.getGenericConcepts().getGenericConceptsList()).containsExactlyElementsOf(rule.getGenericConcepts());
+    assertThat(resultRule.getEducationPrinciples().getEducationPrinciplesList()).containsExactlyElementsOf(rule.getEducationPrinciples());
   }
 
   @Test
index 7e0c5f134cf886cc37edcf2aceb1635d909b4165..a46493caee5cbb49bca1fe53ccc977192d8df770 100644 (file)
@@ -88,22 +88,22 @@ public class CurrentActionTest {
   }
 
   @Test
-  public void return_generic_concepts_seen() {
+  public void return_educationPrinciples_dismiss_notice() {
     UserDto user = db.users().insertUser();
     userSession.logIn(user);
 
-    PropertyDto property = new PropertyDto().setUserUuid(user.getUuid()).setKey("user.dismissedNotices.genericConcepts");
+    PropertyDto property = new PropertyDto().setUserUuid(user.getUuid()).setKey("user.dismissedNotices.educationPrinciples");
     db.properties().insertProperties(userSession.getLogin(), null, null, null, property);
 
     CurrentWsResponse response = call();
 
     assertThat(response.getDismissedNoticesMap().entrySet())
       .extracting(Map.Entry::getKey, Map.Entry::getValue)
-      .contains(Tuple.tuple("genericConcepts", true));
+      .contains(Tuple.tuple("educationPrinciples", true));
   }
 
   @Test
-  public void return_generic_concepts_not_seen() {
+  public void return_educationPrinciples_not_dismissed() {
     UserDto user = db.users().insertUser();
     userSession.logIn(user);
 
@@ -111,7 +111,7 @@ public class CurrentActionTest {
 
     assertThat(response.getDismissedNoticesMap().entrySet())
       .extracting(Map.Entry::getKey, Map.Entry::getValue)
-      .contains(Tuple.tuple("genericConcepts", false));
+      .contains(Tuple.tuple("educationPrinciples", false));
   }
 
   @Test
index 06457e7fc32cb4c93c6a968e6ab859763b9c2d21..d20d7eeb3012ef005acecb05a65af3fa9298d9c6 100644 (file)
@@ -44,16 +44,16 @@ public class DismissNoticeActionTest {
   private final WsActionTester tester = new WsActionTester(new DismissNoticeAction(userSessionRule, db.getDbClient()));
 
   @Test
-  public void dismiss_genericConcepts() {
+  public void dismiss_educationPrinciples() {
     userSessionRule.logIn();
 
     TestResponse testResponse = tester.newRequest()
-      .setParam("notice", "genericConcepts")
+      .setParam("notice", "educationPrinciples")
       .execute();
 
     assertThat(testResponse.getStatus()).isEqualTo(204);
 
-    Optional<PropertyDto> propertyDto = db.properties().findFirstUserProperty(userSessionRule.getUuid(), "user.dismissedNotices.genericConcepts");
+    Optional<PropertyDto> propertyDto = db.properties().findFirstUserProperty(userSessionRule.getUuid(), "user.dismissedNotices.educationPrinciples");
     assertThat(propertyDto).isPresent();
   }
 
@@ -88,22 +88,22 @@ public class DismissNoticeActionTest {
 
     assertThatThrownBy(testRequest::execute)
       .isInstanceOf(IllegalArgumentException.class)
-      .hasMessage("Value of parameter 'notice' (not_supported_value) must be one of: [genericConcepts]");
+      .hasMessage("Value of parameter 'notice' (not_supported_value) must be one of: [educationPrinciples]");
   }
 
 
   @Test
   public void notice_already_exist() {
     userSessionRule.logIn();
-    PropertyDto property = new PropertyDto().setKey("user.dismissedNotices.genericConcepts").setUserUuid(userSessionRule.getUuid());
+    PropertyDto property = new PropertyDto().setKey("user.dismissedNotices.educationPrinciples").setUserUuid(userSessionRule.getUuid());
     db.properties().insertProperties(userSessionRule.getLogin(), null, null, null, property);
 
     TestRequest testRequest = tester.newRequest()
-      .setParam("notice", "genericConcepts");
+      .setParam("notice", "educationPrinciples");
 
     assertThatThrownBy(testRequest::execute)
       .isInstanceOf(IllegalArgumentException.class)
-      .hasMessage("Notice genericConcepts is already dismissed");
+      .hasMessage("Notice educationPrinciples is already dismissed");
   }
 
 
index ec2ee2506247a9faf6d886839c9c6fc8e842ae5e..7ec1c827f9f91dbec20c19d852459e62a2fbfa58 100644 (file)
@@ -123,7 +123,7 @@ message Rule {
   optional bool isExternal = 47;
   optional DeprecatedKeys deprecatedKeys = 48;
   optional DescriptionSections descriptionSections = 49;
-  optional GenericConcepts genericConcepts = 50;
+  optional EducationPrinciples educationPrinciples = 50;
 
   message DescriptionSections {
     repeated DescriptionSection descriptionSections = 1;
@@ -164,8 +164,8 @@ message Tags {
   repeated string tags = 1;
 }
 
-message GenericConcepts {
-  repeated string genericConcepts = 1;
+message EducationPrinciples {
+  repeated string educationPrinciples = 1;
 }
 
 message Actives {