4646import com .fasterxml .jackson .dataformat .yaml .YAMLFactory ;
4747
4848public class CheckstyleMetadata {
49- private static final String CHECK_STRING = "Check" ;
5049 private static final String OPTION_STRING = "Option" ;
5150 private static final String COMMA_STRING = "," ;
5251 private static final int PARAM_TYPE_DB_COLUMN_TYPE_SIZE_LIMIT = 512 ;
@@ -70,7 +69,7 @@ public void updateRulesWithMetadata() {
7069 repository .rules ().forEach (rule -> {
7170 final ModuleDetails moduleDetails = metadataRepo .get (rule .key ());
7271 rule .setHtmlDescription (moduleDetails .getDescription ());
73- rule .setName (getFullCheckName (moduleDetails .getName () + CHECK_STRING ));
72+ rule .setName (getFullCheckName (moduleDetails .getName ()));
7473 rule .setInternalKey (getInternalKey (moduleDetails ));
7574
7675 rule .params ().forEach (param -> { //NOSONAR
@@ -109,7 +108,7 @@ public void createRulesWithMetadata() {
109108 final RulesDefinition .NewRule rule =
110109 repository .createRule (moduleDetails .getFullQualifiedName ());
111110 rule .setHtmlDescription (moduleDetails .getDescription ())
112- .setName (getFullCheckName (moduleDetails .getName () + CHECK_STRING ))
111+ .setName (getFullCheckName (moduleDetails .getName ()))
113112 .setInternalKey (getInternalKey (moduleDetails ))
114113 .setDebtRemediationFunction (debtRemediationFunction )
115114 .setSeverity ("MINOR" )
@@ -319,7 +318,6 @@ public static String getInternalKey(ModuleDetails moduleDetails) {
319318 else {
320319 result += "TreeWalker/" + moduleDetails .getName ();
321320 }
322- result += CHECK_STRING ;
323321 return result ;
324322 }
325323}
0 commit comments