2525import java .util .List ;
2626import java .util .NoSuchElementException ;
2727import org .sonar .api .Beta ;
28+ import org .sonar .api .rule .Severity ;
2829import org .sonar .api .utils .SonarException ;
2930
3031import static org .sonar .api .measures .Metric .ValueType .BOOL ;
@@ -797,7 +798,15 @@ public final class CoreMetrics {
797798 .setOptimizedBestValue (true )
798799 .create ();
799800
801+ /**
802+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
803+ */
804+ @ Deprecated (since = "10.7" )
800805 public static final String BLOCKER_VIOLATIONS_KEY = "blocker_violations" ;
806+ /**
807+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
808+ */
809+ @ Deprecated (since = "10.7" )
801810 public static final Metric <Integer > BLOCKER_VIOLATIONS = new Metric .Builder (BLOCKER_VIOLATIONS_KEY , "Blocker Issues" , Metric .ValueType .INT )
802811 .setDescription ("Blocker issues" )
803812 .setDirection (Metric .DIRECTION_WORST )
@@ -807,7 +816,15 @@ public final class CoreMetrics {
807816 .setOptimizedBestValue (true )
808817 .create ();
809818
819+ /**
820+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
821+ */
822+ @ Deprecated (since = "10.7" )
810823 public static final String CRITICAL_VIOLATIONS_KEY = "critical_violations" ;
824+ /**
825+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
826+ */
827+ @ Deprecated (since = "10.7" )
811828 public static final Metric <Integer > CRITICAL_VIOLATIONS = new Metric .Builder (CRITICAL_VIOLATIONS_KEY , "Critical Issues" , Metric .ValueType .INT )
812829 .setDescription ("Critical issues" )
813830 .setDirection (Metric .DIRECTION_WORST )
@@ -817,7 +834,15 @@ public final class CoreMetrics {
817834 .setOptimizedBestValue (true )
818835 .create ();
819836
837+ /**
838+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
839+ */
840+ @ Deprecated (since = "10.7" )
820841 public static final String MAJOR_VIOLATIONS_KEY = "major_violations" ;
842+ /**
843+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
844+ */
845+ @ Deprecated (since = "10.7" )
821846 public static final Metric <Integer > MAJOR_VIOLATIONS = new Metric .Builder (MAJOR_VIOLATIONS_KEY , "Major Issues" , Metric .ValueType .INT )
822847 .setDescription ("Major issues" )
823848 .setDirection (Metric .DIRECTION_WORST )
@@ -827,7 +852,15 @@ public final class CoreMetrics {
827852 .setOptimizedBestValue (true )
828853 .create ();
829854
855+ /**
856+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
857+ */
858+ @ Deprecated (since = "10.7" )
830859 public static final String MINOR_VIOLATIONS_KEY = "minor_violations" ;
860+ /**
861+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
862+ */
863+ @ Deprecated (since = "10.7" )
831864 public static final Metric <Integer > MINOR_VIOLATIONS = new Metric .Builder (MINOR_VIOLATIONS_KEY , "Minor Issues" , Metric .ValueType .INT )
832865 .setDescription ("Minor issues" )
833866 .setDirection (Metric .DIRECTION_WORST )
@@ -837,7 +870,15 @@ public final class CoreMetrics {
837870 .setOptimizedBestValue (true )
838871 .create ();
839872
873+ /**
874+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
875+ */
876+ @ Deprecated (since = "10.7" )
840877 public static final String INFO_VIOLATIONS_KEY = "info_violations" ;
878+ /**
879+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
880+ */
881+ @ Deprecated (since = "10.7" )
841882 public static final Metric <Integer > INFO_VIOLATIONS = new Metric .Builder (INFO_VIOLATIONS_KEY , "Info Issues" , Metric .ValueType .INT )
842883 .setDescription ("Info issues" )
843884 .setDirection (Metric .DIRECTION_WORST )
@@ -858,7 +899,15 @@ public final class CoreMetrics {
858899 .setDeleteHistoricalData (true )
859900 .create ();
860901
902+ /**
903+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
904+ */
905+ @ Deprecated (since = "10.7" )
861906 public static final String NEW_BLOCKER_VIOLATIONS_KEY = "new_blocker_violations" ;
907+ /**
908+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
909+ */
910+ @ Deprecated (since = "10.7" )
862911 public static final Metric <Integer > NEW_BLOCKER_VIOLATIONS = new Metric .Builder (NEW_BLOCKER_VIOLATIONS_KEY , "New Blocker Issues" , Metric .ValueType .INT )
863912 .setDescription ("New Blocker issues" )
864913 .setDirection (Metric .DIRECTION_WORST )
@@ -869,7 +918,15 @@ public final class CoreMetrics {
869918 .setDeleteHistoricalData (true )
870919 .create ();
871920
921+ /**
922+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
923+ */
924+ @ Deprecated (since = "10.7" )
872925 public static final String NEW_CRITICAL_VIOLATIONS_KEY = "new_critical_violations" ;
926+ /**
927+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
928+ */
929+ @ Deprecated (since = "10.7" )
873930 public static final Metric <Integer > NEW_CRITICAL_VIOLATIONS = new Metric .Builder (NEW_CRITICAL_VIOLATIONS_KEY , "New Critical Issues" , Metric .ValueType .INT )
874931 .setDescription ("New Critical issues" )
875932 .setDirection (Metric .DIRECTION_WORST )
@@ -880,7 +937,15 @@ public final class CoreMetrics {
880937 .setDeleteHistoricalData (true )
881938 .create ();
882939
940+ /**
941+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
942+ */
943+ @ Deprecated (since = "10.7" )
883944 public static final String NEW_MAJOR_VIOLATIONS_KEY = "new_major_violations" ;
945+ /**
946+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
947+ */
948+ @ Deprecated (since = "10.7" )
884949 public static final Metric <Integer > NEW_MAJOR_VIOLATIONS = new Metric .Builder (NEW_MAJOR_VIOLATIONS_KEY , "New Major Issues" , Metric .ValueType .INT )
885950 .setDescription ("New Major issues" )
886951 .setDirection (Metric .DIRECTION_WORST )
@@ -891,7 +956,15 @@ public final class CoreMetrics {
891956 .setDeleteHistoricalData (true )
892957 .create ();
893958
959+ /**
960+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
961+ */
962+ @ Deprecated (since = "10.7" )
894963 public static final String NEW_MINOR_VIOLATIONS_KEY = "new_minor_violations" ;
964+ /**
965+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
966+ */
967+ @ Deprecated (since = "10.7" )
895968 public static final Metric <Integer > NEW_MINOR_VIOLATIONS = new Metric .Builder (NEW_MINOR_VIOLATIONS_KEY , "New Minor Issues" , Metric .ValueType .INT )
896969 .setDescription ("New Minor issues" )
897970 .setDirection (Metric .DIRECTION_WORST )
@@ -902,7 +975,15 @@ public final class CoreMetrics {
902975 .setDeleteHistoricalData (true )
903976 .create ();
904977
978+ /**
979+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
980+ */
981+ @ Deprecated (since = "10.7" )
905982 public static final String NEW_INFO_VIOLATIONS_KEY = "new_info_violations" ;
983+ /**
984+ * @deprecated since 10.7 as {@link Severity} is deprecated. No replacement.
985+ */
986+ @ Deprecated (since = "10.7" )
906987 public static final Metric <Integer > NEW_INFO_VIOLATIONS = new Metric .Builder (NEW_INFO_VIOLATIONS_KEY , "New Info Issues" , Metric .ValueType .INT )
907988 .setDescription ("New Info issues" )
908989 .setDirection (Metric .DIRECTION_WORST )
@@ -1223,14 +1304,18 @@ public final class CoreMetrics {
12231304 * SonarQube Quality Model
12241305 *
12251306 * @since 5.5
1307+ * @deprecated since 10.7. Use {@link #MAINTAINABILITY_ISSUES_KEY} instead.
12261308 */
1309+ @ Deprecated (since = "10.7" )
12271310 public static final String CODE_SMELLS_KEY = "code_smells" ;
12281311
12291312 /**
12301313 * SonarQube Quality Model
12311314 *
12321315 * @since 5.5
1316+ * @deprecated since 10.7. Use {@link #MAINTAINABILITY_ISSUES} instead.
12331317 */
1318+ @ Deprecated (since = "10.7" )
12341319 public static final Metric <Integer > CODE_SMELLS = new Metric .Builder (CODE_SMELLS_KEY , "Code Smells" , Metric .ValueType .INT )
12351320 .setDescription ("Code Smells" )
12361321 .setDirection (Metric .DIRECTION_WORST )
@@ -1244,14 +1329,18 @@ public final class CoreMetrics {
12441329 * SonarQube Quality Model
12451330 *
12461331 * @since 5.5
1332+ * @deprecated since 10.7. Use {@link #NEW_MAINTAINABILITY_ISSUES_KEY} instead.
12471333 */
1334+ @ Deprecated (since = "10.7" )
12481335 public static final String NEW_CODE_SMELLS_KEY = "new_code_smells" ;
12491336
12501337 /**
12511338 * SonarQube Quality Model
12521339 *
12531340 * @since 5.5
1341+ * @deprecated since 10.7. Use {@link #NEW_MAINTAINABILITY_ISSUES} instead.
12541342 */
1343+ @ Deprecated (since = "10.7" )
12551344 public static final Metric <Integer > NEW_CODE_SMELLS = new Metric .Builder (NEW_CODE_SMELLS_KEY , "New Code Smells" , Metric .ValueType .INT )
12561345 .setDescription ("New Code Smells" )
12571346 .setDirection (Metric .DIRECTION_WORST )
@@ -1266,14 +1355,18 @@ public final class CoreMetrics {
12661355 * SonarQube Quality Model
12671356 *
12681357 * @since 5.5
1358+ * @deprecated since 10.7. Use {@link #RELIABILITY_ISSUES_KEY} instead.
12691359 */
1360+ @ Deprecated (since = "10.7" )
12701361 public static final String BUGS_KEY = "bugs" ;
12711362
12721363 /**
12731364 * SonarQube Quality Model
12741365 *
12751366 * @since 5.5
1367+ * @deprecated since 10.7. Use {@link #RELIABILITY_ISSUES} instead.
12761368 */
1369+ @ Deprecated (since = "10.7" )
12771370 public static final Metric <Integer > BUGS = new Metric .Builder (BUGS_KEY , "Bugs" , Metric .ValueType .INT )
12781371 .setDescription ("Bugs" )
12791372 .setDirection (Metric .DIRECTION_WORST )
@@ -1287,14 +1380,18 @@ public final class CoreMetrics {
12871380 * SonarQube Quality Model
12881381 *
12891382 * @since 5.5
1383+ * @deprecated since 10.7. Use {@link #NEW_RELIABILITY_ISSUES_KEY} instead.
12901384 */
1385+ @ Deprecated (since = "10.7" )
12911386 public static final String NEW_BUGS_KEY = "new_bugs" ;
12921387
12931388 /**
12941389 * SonarQube Quality Model
12951390 *
12961391 * @since 5.5
1392+ * @deprecated since 10.7. Use {@link #NEW_RELIABILITY_ISSUES} instead.
12971393 */
1394+ @ Deprecated (since = "10.7" )
12981395 public static final Metric <Integer > NEW_BUGS = new Metric .Builder (NEW_BUGS_KEY , "New Bugs" , Metric .ValueType .INT )
12991396 .setDescription ("New Bugs" )
13001397 .setDirection (Metric .DIRECTION_WORST )
@@ -1309,14 +1406,18 @@ public final class CoreMetrics {
13091406 * SonarQube Quality Model
13101407 *
13111408 * @since 5.5
1409+ * @deprecated since 10.7. Use {@link #SECURITY_ISSUES_KEY} instead.
13121410 */
1411+ @ Deprecated (since = "10.7" )
13131412 public static final String VULNERABILITIES_KEY = "vulnerabilities" ;
13141413
13151414 /**
13161415 * SonarQube Quality Model
13171416 *
13181417 * @since 5.5
1418+ * @deprecated since 10.7. Use {@link #SECURITY_ISSUES} instead.
13191419 */
1420+ @ Deprecated (since = "10.7" )
13201421 public static final Metric <Integer > VULNERABILITIES = new Metric .Builder (VULNERABILITIES_KEY , "Vulnerabilities" , Metric .ValueType .INT )
13211422 .setDescription ("Vulnerabilities" )
13221423 .setDirection (Metric .DIRECTION_WORST )
@@ -1330,14 +1431,17 @@ public final class CoreMetrics {
13301431 * SonarQube Quality Model
13311432 *
13321433 * @since 5.5
1434+ * @deprecated since 10.7. Use {@link #NEW_SECURITY_ISSUES_KEY} instead.
13331435 */
1436+ @ Deprecated (since = "10.7" )
13341437 public static final String NEW_VULNERABILITIES_KEY = "new_vulnerabilities" ;
13351438
13361439 /**
13371440 * SonarQube Quality Model
13381441 *
1339- * @since 5.5
1442+ * @deprecated since 10.7. Use {@link #NEW_SECURITY_ISSUES} instead.
13401443 */
1444+ @ Deprecated (since = "10.7" )
13411445 public static final Metric <Integer > NEW_VULNERABILITIES = new Metric .Builder (NEW_VULNERABILITIES_KEY , "New Vulnerabilities" , Metric .ValueType .INT )
13421446 .setDescription ("New Vulnerabilities" )
13431447 .setDirection (Metric .DIRECTION_WORST )
0 commit comments