Class CoreMetrics


  • public final class CoreMetrics
    extends java.lang.Object
    Since:
    1.10
    • Field Detail

      • DOMAIN_SIZE

        public static java.lang.String DOMAIN_SIZE
      • DOMAIN_COVERAGE

        public static java.lang.String DOMAIN_COVERAGE
      • DOMAIN_COMPLEXITY

        public static java.lang.String DOMAIN_COMPLEXITY
      • DOMAIN_DOCUMENTATION

        @Deprecated
        public static java.lang.String DOMAIN_DOCUMENTATION
        Deprecated.
        since 6.2. Merged into DOMAIN_SIZE
      • DOMAIN_SCM

        public static java.lang.String DOMAIN_SCM
      • DOMAIN_ISSUES

        public static java.lang.String DOMAIN_ISSUES
      • DOMAIN_GENERAL

        public static java.lang.String DOMAIN_GENERAL
      • DOMAIN_DUPLICATIONS

        public static java.lang.String DOMAIN_DUPLICATIONS
      • DOMAIN_MAINTAINABILITY

        public static java.lang.String DOMAIN_MAINTAINABILITY
        SonarQube Quality Model
        Since:
        5.5
      • DOMAIN_RELIABILITY

        public static java.lang.String DOMAIN_RELIABILITY
        SonarQube Quality Model
        Since:
        5.5
      • DOMAIN_SECURITY

        public static java.lang.String DOMAIN_SECURITY
        SonarQube Quality Model
        Since:
        5.5
      • DOMAIN_SECURITY_REVIEW

        public static java.lang.String DOMAIN_SECURITY_REVIEW
        Since:
        8.2
      • DOMAIN_RELEASABILITY

        public static java.lang.String DOMAIN_RELEASABILITY
        Since:
        5.5
      • LINES_KEY

        public static final java.lang.String LINES_KEY
        Computed by the platform since SQ 5.1
        See Also:
        Constant Field Values
      • LINES

        public static final Metric<java.lang.Integer> LINES
      • GENERATED_LINES_KEY

        public static final java.lang.String GENERATED_LINES_KEY
        See Also:
        Constant Field Values
      • GENERATED_LINES

        public static final Metric<java.lang.Integer> GENERATED_LINES
      • NCLOC

        public static final Metric<java.lang.Integer> NCLOC
      • NEW_LINES_KEY

        public static final java.lang.String NEW_LINES_KEY
        Since:
        6.1
        See Also:
        Constant Field Values
      • NEW_LINES

        public static final Metric<java.lang.Integer> NEW_LINES
        Since:
        6.1
      • NCLOC_LANGUAGE_DISTRIBUTION_KEY

        public static final java.lang.String NCLOC_LANGUAGE_DISTRIBUTION_KEY
        Since:
        4.4
        See Also:
        Constant Field Values
      • NCLOC_LANGUAGE_DISTRIBUTION

        public static final Metric<java.lang.String> NCLOC_LANGUAGE_DISTRIBUTION
        Since:
        4.4
      • GENERATED_NCLOC_KEY

        public static final java.lang.String GENERATED_NCLOC_KEY
        See Also:
        Constant Field Values
      • GENERATED_NCLOC

        public static final Metric<java.lang.Integer> GENERATED_NCLOC
      • CLASSES

        public static final Metric<java.lang.Integer> CLASSES
      • FILES

        public static final Metric<java.lang.Integer> FILES
        Computed by the platform.
      • FUNCTIONS_KEY

        public static final java.lang.String FUNCTIONS_KEY
        Computed by the platform.
        See Also:
        Constant Field Values
      • FUNCTIONS

        public static final Metric<java.lang.Integer> FUNCTIONS
      • STATEMENTS

        public static final Metric<java.lang.Integer> STATEMENTS
      • PUBLIC_API

        public static final Metric<java.lang.Integer> PUBLIC_API
      • PROJECTS_KEY

        public static final java.lang.String PROJECTS_KEY
        Since:
        3.0
        See Also:
        Constant Field Values
      • PROJECTS

        public static final Metric<java.lang.Integer> PROJECTS
        Since:
        3.0
      • COMMENT_LINES_KEY

        public static final java.lang.String COMMENT_LINES_KEY
        Moved to Size domain since 6.2
        See Also:
        Constant Field Values
      • COMMENT_LINES

        public static final Metric<java.lang.Integer> COMMENT_LINES
      • COMMENT_LINES_DENSITY_KEY

        public static final java.lang.String COMMENT_LINES_DENSITY_KEY
        Moved to Size domain since 6.2
        See Also:
        Constant Field Values
      • COMMENT_LINES_DENSITY

        public static final Metric<java.lang.Double> COMMENT_LINES_DENSITY
      • PUBLIC_DOCUMENTED_API_DENSITY_KEY

        @Deprecated
        public static final java.lang.String PUBLIC_DOCUMENTED_API_DENSITY_KEY
        Deprecated.
        since 6.2
        See Also:
        SONAR-8328, Constant Field Values
      • PUBLIC_DOCUMENTED_API_DENSITY

        public static final Metric<java.lang.Double> PUBLIC_DOCUMENTED_API_DENSITY
      • PUBLIC_UNDOCUMENTED_API_KEY

        @Deprecated
        public static final java.lang.String PUBLIC_UNDOCUMENTED_API_KEY
        Deprecated.
        since 6.2
        See Also:
        SONAR-8328, Constant Field Values
      • PUBLIC_UNDOCUMENTED_API

        public static final Metric<java.lang.Integer> PUBLIC_UNDOCUMENTED_API
      • COMPLEXITY

        public static final Metric<java.lang.Integer> COMPLEXITY
      • FILE_COMPLEXITY_KEY

        @Deprecated
        public static final java.lang.String FILE_COMPLEXITY_KEY
        Deprecated.
        since 6.7
        See Also:
        Constant Field Values
      • FILE_COMPLEXITY

        @Deprecated
        public static final Metric<java.lang.Double> FILE_COMPLEXITY
        Deprecated.
        since 6.7
        Information about the cyclomatic complexity per file, calculated by divided the COMPLEXITY by the number of FILES.
      • COMPLEXITY_IN_CLASSES_KEY

        @Deprecated
        public static final java.lang.String COMPLEXITY_IN_CLASSES_KEY
        Deprecated.
        since 6.7
        Since:
        3.6
        See Also:
        Constant Field Values
      • COMPLEXITY_IN_CLASSES

        @Deprecated
        public static final Metric<java.lang.Integer> COMPLEXITY_IN_CLASSES
        Deprecated.
        since 6.7
        Since:
        3.6
      • CLASS_COMPLEXITY_KEY

        @Deprecated
        public static final java.lang.String CLASS_COMPLEXITY_KEY
        Deprecated.
        since 6.7
        See Also:
        Constant Field Values
      • CLASS_COMPLEXITY

        @Deprecated
        public static final Metric<java.lang.Double> CLASS_COMPLEXITY
        Deprecated.
        since 6.7
        Information about the cyclomatic complexity per class, calculated by divided the COMPLEXITY_IN_CLASSES by the number of CLASSES.
      • COMPLEXITY_IN_FUNCTIONS_KEY

        @Deprecated
        public static final java.lang.String COMPLEXITY_IN_FUNCTIONS_KEY
        Deprecated.
        since 6.7
        Since:
        3.6
        See Also:
        Constant Field Values
      • COMPLEXITY_IN_FUNCTIONS

        @Deprecated
        public static final Metric<java.lang.Integer> COMPLEXITY_IN_FUNCTIONS
        Deprecated.
        since 6.7
        Since:
        3.6
      • FUNCTION_COMPLEXITY_KEY

        @Deprecated
        public static final java.lang.String FUNCTION_COMPLEXITY_KEY
        Deprecated.
        since 6.7
        See Also:
        Constant Field Values
      • FUNCTION_COMPLEXITY

        @Deprecated
        public static final Metric<java.lang.Double> FUNCTION_COMPLEXITY
        Deprecated.
        since 6.7
        Information about the cyclomatic complexity per function, calculated by divided the COMPLEXITY_IN_FUNCTIONS by the number of FUNCTIONS.
      • FUNCTION_COMPLEXITY_DISTRIBUTION_KEY

        @Deprecated
        public static final java.lang.String FUNCTION_COMPLEXITY_DISTRIBUTION_KEY
        Deprecated.
        since 6.7
        See Also:
        Constant Field Values
      • FUNCTION_COMPLEXITY_DISTRIBUTION

        @Deprecated
        public static final Metric<java.lang.String> FUNCTION_COMPLEXITY_DISTRIBUTION
        Deprecated.
        since 6.7
      • FILE_COMPLEXITY_DISTRIBUTION_KEY

        @Deprecated
        public static final java.lang.String FILE_COMPLEXITY_DISTRIBUTION_KEY
        Deprecated.
        since 6.7
        See Also:
        Constant Field Values
      • FILE_COMPLEXITY_DISTRIBUTION

        @Deprecated
        public static final Metric<java.lang.String> FILE_COMPLEXITY_DISTRIBUTION
        Deprecated.
        since 6.7
      • COGNITIVE_COMPLEXITY_KEY

        public static final java.lang.String COGNITIVE_COMPLEXITY_KEY
        See Also:
        Constant Field Values
      • COGNITIVE_COMPLEXITY

        public static final Metric<java.lang.Integer> COGNITIVE_COMPLEXITY
      • TESTS

        public static final Metric<java.lang.Integer> TESTS
        Value of measure for this metric can be saved from Sensor, taking into account following rules:
        • Non-zero value should be saved for resources representing tests. And Sonar provides default Decorator, which will decorate parent resources.
        • Should include TEST_FAILURES and TEST_ERRORS, but should not include SKIPPED_TESTS.
      • TEST_EXECUTION_TIME_KEY

        public static final java.lang.String TEST_EXECUTION_TIME_KEY
        See Also:
        Constant Field Values
      • TEST_EXECUTION_TIME

        public static final Metric<java.lang.Long> TEST_EXECUTION_TIME
      • TEST_ERRORS

        public static final Metric<java.lang.Integer> TEST_ERRORS
      • SKIPPED_TESTS_KEY

        public static final java.lang.String SKIPPED_TESTS_KEY
        See Also:
        Constant Field Values
      • SKIPPED_TESTS

        public static final Metric<java.lang.Integer> SKIPPED_TESTS
      • TEST_FAILURES_KEY

        public static final java.lang.String TEST_FAILURES_KEY
        See Also:
        Constant Field Values
      • TEST_FAILURES

        public static final Metric<java.lang.Integer> TEST_FAILURES
      • TEST_SUCCESS_DENSITY_KEY

        public static final java.lang.String TEST_SUCCESS_DENSITY_KEY
        See Also:
        Constant Field Values
      • TEST_SUCCESS_DENSITY

        public static final Metric<java.lang.Double> TEST_SUCCESS_DENSITY
      • COVERAGE

        public static final Metric<java.lang.Double> COVERAGE
      • NEW_COVERAGE_KEY

        public static final java.lang.String NEW_COVERAGE_KEY
        See Also:
        Constant Field Values
      • NEW_COVERAGE

        public static final Metric<java.lang.Double> NEW_COVERAGE
      • LINES_TO_COVER_KEY

        public static final java.lang.String LINES_TO_COVER_KEY
        See Also:
        Constant Field Values
      • LINES_TO_COVER

        public static final Metric<java.lang.Integer> LINES_TO_COVER
      • NEW_LINES_TO_COVER_KEY

        public static final java.lang.String NEW_LINES_TO_COVER_KEY
        See Also:
        Constant Field Values
      • NEW_LINES_TO_COVER

        public static final Metric<java.lang.Integer> NEW_LINES_TO_COVER
      • UNCOVERED_LINES_KEY

        public static final java.lang.String UNCOVERED_LINES_KEY
        See Also:
        Constant Field Values
      • UNCOVERED_LINES

        public static final Metric<java.lang.Integer> UNCOVERED_LINES
      • NEW_UNCOVERED_LINES_KEY

        public static final java.lang.String NEW_UNCOVERED_LINES_KEY
        See Also:
        Constant Field Values
      • NEW_UNCOVERED_LINES

        public static final Metric<java.lang.Integer> NEW_UNCOVERED_LINES
      • LINE_COVERAGE_KEY

        public static final java.lang.String LINE_COVERAGE_KEY
        See Also:
        Constant Field Values
      • LINE_COVERAGE

        public static final Metric<java.lang.Double> LINE_COVERAGE
      • NEW_LINE_COVERAGE_KEY

        public static final java.lang.String NEW_LINE_COVERAGE_KEY
        See Also:
        Constant Field Values
      • NEW_LINE_COVERAGE

        public static final Metric<java.lang.Double> NEW_LINE_COVERAGE
      • CONDITIONS_TO_COVER_KEY

        public static final java.lang.String CONDITIONS_TO_COVER_KEY
        See Also:
        Constant Field Values
      • CONDITIONS_TO_COVER

        public static final Metric<java.lang.Integer> CONDITIONS_TO_COVER
      • NEW_CONDITIONS_TO_COVER_KEY

        public static final java.lang.String NEW_CONDITIONS_TO_COVER_KEY
        See Also:
        Constant Field Values
      • NEW_CONDITIONS_TO_COVER

        public static final Metric<java.lang.Integer> NEW_CONDITIONS_TO_COVER
      • UNCOVERED_CONDITIONS_KEY

        public static final java.lang.String UNCOVERED_CONDITIONS_KEY
        See Also:
        Constant Field Values
      • UNCOVERED_CONDITIONS

        public static final Metric<java.lang.Integer> UNCOVERED_CONDITIONS
      • NEW_UNCOVERED_CONDITIONS_KEY

        public static final java.lang.String NEW_UNCOVERED_CONDITIONS_KEY
        See Also:
        Constant Field Values
      • NEW_UNCOVERED_CONDITIONS

        public static final Metric<java.lang.Integer> NEW_UNCOVERED_CONDITIONS
      • BRANCH_COVERAGE_KEY

        public static final java.lang.String BRANCH_COVERAGE_KEY
        See Also:
        Constant Field Values
      • BRANCH_COVERAGE

        public static final Metric<java.lang.Double> BRANCH_COVERAGE
      • NEW_BRANCH_COVERAGE_KEY

        public static final java.lang.String NEW_BRANCH_COVERAGE_KEY
        See Also:
        Constant Field Values
      • NEW_BRANCH_COVERAGE

        public static final Metric<java.lang.Double> NEW_BRANCH_COVERAGE
      • DUPLICATED_LINES_KEY

        public static final java.lang.String DUPLICATED_LINES_KEY
        See Also:
        Constant Field Values
      • DUPLICATED_LINES

        public static final Metric<java.lang.Integer> DUPLICATED_LINES
      • NEW_DUPLICATED_LINES_KEY

        public static final java.lang.String NEW_DUPLICATED_LINES_KEY
        Since:
        6.1
        See Also:
        Constant Field Values
      • NEW_DUPLICATED_LINES

        public static final Metric<java.lang.Integer> NEW_DUPLICATED_LINES
        Since:
        6.1
      • DUPLICATED_BLOCKS_KEY

        public static final java.lang.String DUPLICATED_BLOCKS_KEY
        See Also:
        Constant Field Values
      • DUPLICATED_BLOCKS

        public static final Metric<java.lang.Integer> DUPLICATED_BLOCKS
      • NEW_BLOCKS_DUPLICATED_KEY

        public static final java.lang.String NEW_BLOCKS_DUPLICATED_KEY
        Since:
        6.1
        See Also:
        Constant Field Values
      • NEW_BLOCKS_DUPLICATED

        public static final Metric<java.lang.Integer> NEW_BLOCKS_DUPLICATED
        Since:
        6.1
      • DUPLICATED_FILES_KEY

        public static final java.lang.String DUPLICATED_FILES_KEY
        See Also:
        Constant Field Values
      • DUPLICATED_FILES

        public static final Metric<java.lang.Integer> DUPLICATED_FILES
        For files: if it contains duplicates, then 1, otherwise 0. For other resources: amount of files under this resource with duplicates.
      • DUPLICATED_LINES_DENSITY_KEY

        public static final java.lang.String DUPLICATED_LINES_DENSITY_KEY
        See Also:
        Constant Field Values
      • DUPLICATED_LINES_DENSITY

        public static final Metric<java.lang.Double> DUPLICATED_LINES_DENSITY
      • NEW_DUPLICATED_LINES_DENSITY_KEY

        public static final java.lang.String NEW_DUPLICATED_LINES_DENSITY_KEY
        Since:
        6.1
        See Also:
        Constant Field Values
      • NEW_DUPLICATED_LINES_DENSITY

        public static final Metric<java.lang.Integer> NEW_DUPLICATED_LINES_DENSITY
        Since:
        6.1
      • DUPLICATIONS_DATA_KEY

        @Deprecated
        public static final java.lang.String DUPLICATIONS_DATA_KEY
        Deprecated.
        since 4.5. Internal storage of duplication is not an API.
        See Also:
        Constant Field Values
      • DUPLICATIONS_DATA

        @Deprecated
        public static final Metric<java.lang.String> DUPLICATIONS_DATA
        Deprecated.
        since 4.5. Internal storage of duplication is not an API.
        Information about duplications, which is represented as an XML string.

        Here is the format (since Sonar 2.12):

         
         <duplications>
           <!-- Multiple groups: -->
           <g>
             <!-- Multiple blocks: -->
             <b r="[resource key]" s="[first line]" l="[number of lines]" />
             ...
           </g>
           ...
         </duplications>
         
         
      • VIOLATIONS

        public static final Metric<java.lang.Integer> VIOLATIONS
      • BLOCKER_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String BLOCKER_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • BLOCKER_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> BLOCKER_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • CRITICAL_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String CRITICAL_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • CRITICAL_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> CRITICAL_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • MAJOR_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String MAJOR_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • MAJOR_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> MAJOR_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • MINOR_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String MINOR_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • MINOR_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> MINOR_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • INFO_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String INFO_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • INFO_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> INFO_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • NEW_VIOLATIONS_KEY

        public static final java.lang.String NEW_VIOLATIONS_KEY
        See Also:
        Constant Field Values
      • NEW_VIOLATIONS

        public static final Metric<java.lang.Integer> NEW_VIOLATIONS
      • NEW_BLOCKER_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_BLOCKER_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • NEW_BLOCKER_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_BLOCKER_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • NEW_CRITICAL_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_CRITICAL_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • NEW_CRITICAL_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_CRITICAL_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • NEW_MAJOR_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_MAJOR_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • NEW_MAJOR_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_MAJOR_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • NEW_MINOR_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_MINOR_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • NEW_MINOR_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_MINOR_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • NEW_INFO_VIOLATIONS_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_INFO_VIOLATIONS_KEY
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
        See Also:
        Constant Field Values
      • NEW_INFO_VIOLATIONS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_INFO_VIOLATIONS
        Deprecated.
        since 10.7 as Severity is deprecated. No replacement.
      • FALSE_POSITIVE_ISSUES_KEY

        public static final java.lang.String FALSE_POSITIVE_ISSUES_KEY
        Since:
        3.6
        See Also:
        Constant Field Values
      • FALSE_POSITIVE_ISSUES

        public static final Metric<java.lang.Integer> FALSE_POSITIVE_ISSUES
        Since:
        3.6
      • WONT_FIX_ISSUES_KEY

        @Deprecated(since="10.3")
        public static final java.lang.String WONT_FIX_ISSUES_KEY
        Deprecated.
        since 10.3. Use ACCEPTED_ISSUES_KEY instead.
        Since:
        5.6
        See Also:
        Constant Field Values
      • WONT_FIX_ISSUES

        @Deprecated(since="10.3")
        public static final Metric<java.lang.Integer> WONT_FIX_ISSUES
        Deprecated.
        since 10.3. Use ACCEPTED_ISSUES instead.
        Since:
        5.6
      • ACCEPTED_ISSUES_KEY

        public static final java.lang.String ACCEPTED_ISSUES_KEY
        Since:
        10.3
        See Also:
        Constant Field Values
      • ACCEPTED_ISSUES

        public static final Metric<java.lang.Integer> ACCEPTED_ISSUES
        Since:
        10.3
      • NEW_ACCEPTED_ISSUES_KEY

        public static final java.lang.String NEW_ACCEPTED_ISSUES_KEY
        Since:
        10.4
        See Also:
        Constant Field Values
      • NEW_ACCEPTED_ISSUES

        public static final Metric<java.lang.Integer> NEW_ACCEPTED_ISSUES
        Since:
        10.4
      • HIGH_IMPACT_ACCEPTED_ISSUES_KEY

        @Deprecated(since="10.6")
        public static final java.lang.String HIGH_IMPACT_ACCEPTED_ISSUES_KEY
        Deprecated.
        since 10.6
        Since:
        10.4
        See Also:
        Constant Field Values
      • HIGH_IMPACT_ACCEPTED_ISSUES

        @Deprecated(since="10.6")
        public static final Metric<java.lang.Integer> HIGH_IMPACT_ACCEPTED_ISSUES
        Deprecated.
        since 10.6
        Since:
        10.4
      • MAINTAINABILITY_ISSUES_KEY

        @Beta
        public static final java.lang.String MAINTAINABILITY_ISSUES_KEY
        Since:
        10.6
        See Also:
        Constant Field Values
      • MAINTAINABILITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> MAINTAINABILITY_ISSUES
        This metric relates to issues with the software quality set as 'Maintainability'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.6
      • NEW_MAINTAINABILITY_ISSUES_KEY

        @Beta
        public static final java.lang.String NEW_MAINTAINABILITY_ISSUES_KEY
        Since:
        10.7
        See Also:
        Constant Field Values
      • NEW_MAINTAINABILITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> NEW_MAINTAINABILITY_ISSUES
        This metric relates to new issues with the software quality set as 'Maintainability'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.7
      • RELIABILITY_ISSUES_KEY

        @Beta
        public static final java.lang.String RELIABILITY_ISSUES_KEY
        Since:
        10.6
        See Also:
        Constant Field Values
      • RELIABILITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> RELIABILITY_ISSUES
        This metric relates to issues with the software quality set as 'Reliability'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.6
      • NEW_RELIABILITY_ISSUES_KEY

        @Beta
        public static final java.lang.String NEW_RELIABILITY_ISSUES_KEY
        Since:
        10.7
        See Also:
        Constant Field Values
      • NEW_RELIABILITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> NEW_RELIABILITY_ISSUES
        This metric relates to new issues with the software quality set as 'Reliability'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.7
      • SECURITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> SECURITY_ISSUES
        This metric relates to issues with the software quality set as 'Security'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.6
      • NEW_SECURITY_ISSUES_KEY

        @Beta
        public static final java.lang.String NEW_SECURITY_ISSUES_KEY
        Since:
        10.7
        See Also:
        Constant Field Values
      • NEW_SECURITY_ISSUES

        @Beta
        public static final Metric<java.lang.String> NEW_SECURITY_ISSUES
        This metric relates to new issues with the software quality set as 'Security'. It contains information about total number of these issues as well as their distribution based on the severity within the impact. Example of the format: { "total": 3, "HIGH": 1, "MEDIUM": 1, "LOW": 1 }
        Since:
        10.7
      • OPEN_ISSUES_KEY

        @Deprecated(since="10.4")
        public static final java.lang.String OPEN_ISSUES_KEY
        Deprecated.
        since 10.4. Use VIOLATIONS_KEY instead.
        Since:
        3.6
        See Also:
        Constant Field Values
      • OPEN_ISSUES

        @Deprecated(since="10.4")
        public static final Metric<java.lang.Integer> OPEN_ISSUES
        Deprecated.
        since 10.4. Use VIOLATIONS instead.
        Since:
        3.6
      • REOPENED_ISSUES_KEY

        @Deprecated(since="10.4")
        public static final java.lang.String REOPENED_ISSUES_KEY
        Deprecated.
        since 10.4. Use VIOLATIONS_KEY instead.
        Since:
        3.6
        See Also:
        Constant Field Values
      • REOPENED_ISSUES

        @Deprecated(since="10.4")
        public static final Metric<java.lang.Integer> REOPENED_ISSUES
        Deprecated.
        since 10.4. Use VIOLATIONS instead.
        Since:
        3.6
      • CONFIRMED_ISSUES_KEY

        @Deprecated(since="10.4")
        public static final java.lang.String CONFIRMED_ISSUES_KEY
        Deprecated.
        since 10.4 as status Issue.STATUS_CONFIRMED is deprecated. No replacement.
        Since:
        3.6
        See Also:
        Constant Field Values
      • CONFIRMED_ISSUES

        @Deprecated(since="10.4")
        public static final Metric<java.lang.Integer> CONFIRMED_ISSUES
        Deprecated.
        since 10.4 as status Issue.STATUS_CONFIRMED is deprecated. No replacement.
        Since:
        3.6
      • CODE_SMELLS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> CODE_SMELLS
        Deprecated.
        since 10.7. Use MAINTAINABILITY_ISSUES instead.
        SonarQube Quality Model
        Since:
        5.5
      • NEW_CODE_SMELLS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_CODE_SMELLS
        Deprecated.
        since 10.7. Use NEW_MAINTAINABILITY_ISSUES instead.
        SonarQube Quality Model
        Since:
        5.5
      • BUGS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> BUGS
        Deprecated.
        since 10.7. Use RELIABILITY_ISSUES instead.
        SonarQube Quality Model
        Since:
        5.5
      • NEW_BUGS

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_BUGS
        Deprecated.
        since 10.7. Use NEW_RELIABILITY_ISSUES instead.
        SonarQube Quality Model
        Since:
        5.5
      • VULNERABILITIES_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String VULNERABILITIES_KEY
        Deprecated.
        since 10.7. Use SECURITY_ISSUES_KEY instead.
        SonarQube Quality Model
        Since:
        5.5
        See Also:
        Constant Field Values
      • VULNERABILITIES

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> VULNERABILITIES
        Deprecated.
        since 10.7. Use SECURITY_ISSUES instead.
        SonarQube Quality Model
        Since:
        5.5
      • NEW_VULNERABILITIES_KEY

        @Deprecated(since="10.7")
        public static final java.lang.String NEW_VULNERABILITIES_KEY
        Deprecated.
        since 10.7. Use NEW_SECURITY_ISSUES_KEY instead.
        SonarQube Quality Model
        Since:
        5.5
        See Also:
        Constant Field Values
      • NEW_VULNERABILITIES

        @Deprecated(since="10.7")
        public static final Metric<java.lang.Integer> NEW_VULNERABILITIES
        Deprecated.
        since 10.7. Use NEW_SECURITY_ISSUES instead.
        SonarQube Quality Model
      • SECURITY_HOTSPOTS_KEY

        public static final java.lang.String SECURITY_HOTSPOTS_KEY
        Since:
        7.8
        See Also:
        Constant Field Values
      • SECURITY_HOTSPOTS

        public static final Metric<java.lang.Integer> SECURITY_HOTSPOTS
        Since:
        7.8
      • NEW_SECURITY_HOTSPOTS_KEY

        public static final java.lang.String NEW_SECURITY_HOTSPOTS_KEY
        Since:
        7.8
        See Also:
        Constant Field Values
      • NEW_SECURITY_HOTSPOTS

        public static final Metric<java.lang.Integer> NEW_SECURITY_HOTSPOTS
        Since:
        7.8
      • TECHNICAL_DEBT_KEY

        public static final java.lang.String TECHNICAL_DEBT_KEY
        Since:
        4.0
        See Also:
        Constant Field Values
      • TECHNICAL_DEBT

        public static final Metric<java.lang.Long> TECHNICAL_DEBT
        Since:
        4.0
      • NEW_TECHNICAL_DEBT_KEY

        public static final java.lang.String NEW_TECHNICAL_DEBT_KEY
        Since:
        4.1
        See Also:
        Constant Field Values
      • NEW_TECHNICAL_DEBT

        public static final Metric<java.lang.Long> NEW_TECHNICAL_DEBT
        Since:
        4.1
      • SQALE_RATING_KEY

        public static final java.lang.String SQALE_RATING_KEY
        Since:
        4.5
        See Also:
        Constant Field Values
      • SQALE_RATING

        public static final Metric<java.lang.Integer> SQALE_RATING
        Since:
        4.5
      • NEW_MAINTAINABILITY_RATING_KEY

        public static final java.lang.String NEW_MAINTAINABILITY_RATING_KEY
        Since:
        6.2
        See Also:
        Constant Field Values
      • NEW_MAINTAINABILITY_RATING

        public static final Metric<java.lang.Integer> NEW_MAINTAINABILITY_RATING
        Since:
        6.2
      • DEVELOPMENT_COST_KEY

        public static final java.lang.String DEVELOPMENT_COST_KEY
        Since:
        4.5
        See Also:
        Constant Field Values
      • DEVELOPMENT_COST

        public static final Metric<java.lang.String> DEVELOPMENT_COST
        Since:
        4.5
      • NEW_DEVELOPMENT_COST_KEY

        public static final java.lang.String NEW_DEVELOPMENT_COST_KEY
        Since:
        7.0
        See Also:
        Constant Field Values
      • NEW_DEVELOPMENT_COST

        public static final Metric<java.lang.String> NEW_DEVELOPMENT_COST
        Since:
        7.0
      • SQALE_DEBT_RATIO_KEY

        public static final java.lang.String SQALE_DEBT_RATIO_KEY
        Since:
        4.5
        See Also:
        Constant Field Values
      • SQALE_DEBT_RATIO

        public static final Metric<java.lang.Double> SQALE_DEBT_RATIO
        Since:
        4.5
      • NEW_SQALE_DEBT_RATIO_KEY

        public static final java.lang.String NEW_SQALE_DEBT_RATIO_KEY
        Since:
        5.2
        See Also:
        Constant Field Values
      • NEW_SQALE_DEBT_RATIO

        public static final Metric<java.lang.Double> NEW_SQALE_DEBT_RATIO
        Since:
        5.2
      • EFFORT_TO_REACH_MAINTAINABILITY_RATING_A_KEY

        public static final java.lang.String EFFORT_TO_REACH_MAINTAINABILITY_RATING_A_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • EFFORT_TO_REACH_MAINTAINABILITY_RATING_A

        public static final Metric<java.lang.Long> EFFORT_TO_REACH_MAINTAINABILITY_RATING_A
        Since:
        5.5
      • RELIABILITY_REMEDIATION_EFFORT_KEY

        public static final java.lang.String RELIABILITY_REMEDIATION_EFFORT_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • RELIABILITY_REMEDIATION_EFFORT

        public static final Metric<java.lang.Long> RELIABILITY_REMEDIATION_EFFORT
        Since:
        5.5
      • NEW_RELIABILITY_REMEDIATION_EFFORT_KEY

        public static final java.lang.String NEW_RELIABILITY_REMEDIATION_EFFORT_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • NEW_RELIABILITY_REMEDIATION_EFFORT

        public static final Metric<java.lang.Long> NEW_RELIABILITY_REMEDIATION_EFFORT
        Since:
        5.5
      • RELIABILITY_RATING_KEY

        public static final java.lang.String RELIABILITY_RATING_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • RELIABILITY_RATING

        public static final Metric<java.lang.Integer> RELIABILITY_RATING
        Since:
        5.5
      • NEW_RELIABILITY_RATING_KEY

        public static final java.lang.String NEW_RELIABILITY_RATING_KEY
        Since:
        6.2
        See Also:
        Constant Field Values
      • NEW_RELIABILITY_RATING

        public static final Metric<java.lang.Integer> NEW_RELIABILITY_RATING
        Since:
        6.2
      • SECURITY_REMEDIATION_EFFORT_KEY

        public static final java.lang.String SECURITY_REMEDIATION_EFFORT_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • SECURITY_REMEDIATION_EFFORT

        public static final Metric<java.lang.Long> SECURITY_REMEDIATION_EFFORT
        Since:
        5.5
      • NEW_SECURITY_REMEDIATION_EFFORT_KEY

        public static final java.lang.String NEW_SECURITY_REMEDIATION_EFFORT_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • NEW_SECURITY_REMEDIATION_EFFORT

        public static final Metric<java.lang.Long> NEW_SECURITY_REMEDIATION_EFFORT
        Since:
        5.5
      • SECURITY_RATING_KEY

        public static final java.lang.String SECURITY_RATING_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • SECURITY_RATING

        public static final Metric<java.lang.Integer> SECURITY_RATING
        Since:
        5.5
      • NEW_SECURITY_RATING_KEY

        public static final java.lang.String NEW_SECURITY_RATING_KEY
        Since:
        6.2
        See Also:
        Constant Field Values
      • NEW_SECURITY_RATING

        public static final Metric<java.lang.Integer> NEW_SECURITY_RATING
        Since:
        6.2
      • SECURITY_REVIEW_RATING_KEY

        public static final java.lang.String SECURITY_REVIEW_RATING_KEY
        Since:
        7.8
        See Also:
        Constant Field Values
      • SECURITY_REVIEW_RATING

        public static final Metric<java.lang.Integer> SECURITY_REVIEW_RATING
        Since:
        7.8
      • NEW_SECURITY_REVIEW_RATING_KEY

        public static final java.lang.String NEW_SECURITY_REVIEW_RATING_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • NEW_SECURITY_REVIEW_RATING

        public static final Metric<java.lang.Integer> NEW_SECURITY_REVIEW_RATING
        Since:
        8.2
      • SECURITY_HOTSPOTS_REVIEWED_KEY

        public static final java.lang.String SECURITY_HOTSPOTS_REVIEWED_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • SECURITY_HOTSPOTS_REVIEWED

        public static final Metric<java.lang.Integer> SECURITY_HOTSPOTS_REVIEWED
        Since:
        8.2
      • NEW_SECURITY_HOTSPOTS_REVIEWED_KEY

        public static final java.lang.String NEW_SECURITY_HOTSPOTS_REVIEWED_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • NEW_SECURITY_HOTSPOTS_REVIEWED

        public static final Metric<java.lang.Integer> NEW_SECURITY_HOTSPOTS_REVIEWED
        Since:
        8.2
      • SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY

        public static final java.lang.String SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • SECURITY_HOTSPOTS_REVIEWED_STATUS

        public static final Metric<java.lang.Integer> SECURITY_HOTSPOTS_REVIEWED_STATUS
        Since:
        8.2 This hidden metric is only needed to compute 'security_review_rating' and 'security_hotspots_reviewed' on Applications.
      • SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY

        public static final java.lang.String SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • SECURITY_HOTSPOTS_TO_REVIEW_STATUS

        public static final Metric<java.lang.Integer> SECURITY_HOTSPOTS_TO_REVIEW_STATUS
        Since:
        8.2 This hidden metric is only needed to compute 'security_review_rating' and 'security_hotspots_reviewed' on Applications.
      • NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY

        public static final java.lang.String NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS

        public static final Metric<java.lang.Integer> NEW_SECURITY_HOTSPOTS_REVIEWED_STATUS
        Since:
        8.2 This hidden metric is only needed to compute 'new_security_review_rating' and 'new_security_hotspots_reviewed' on Applications.
      • NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY

        public static final java.lang.String NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS_KEY
        Since:
        8.2
        See Also:
        Constant Field Values
      • NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS

        public static final Metric<java.lang.Integer> NEW_SECURITY_HOTSPOTS_TO_REVIEW_STATUS
        Since:
        8.2 This hidden metric is only needed to compute 'new_security_review_rating' and 'new_security_hotspots_reviewed' on Applications.
      • NCLOC_DATA_KEY

        public static final java.lang.String NCLOC_DATA_KEY
        Since:
        2.14
        See Also:
        Constant Field Values
      • NCLOC_DATA

        public static final Metric<java.lang.String> NCLOC_DATA
        Information about lines of code in file. Key-value pairs, where key - is a number of line, and value - is an indicator of whether line contains code (1) or not (0). If a line number is missing in the map it is equivalent to the default value (0).
        Since:
        2.14
        See Also:
        FileLinesContext
      • COMMENT_LINES_DATA_KEY

        @Deprecated
        public static final java.lang.String COMMENT_LINES_DATA_KEY
        Deprecated.
        in 7.3. Measures are no longer sent within analysis reports, and by consequence no longer persisted nor available from web API.
        Since:
        2.14
        See Also:
        Constant Field Values
      • COMMENT_LINES_DATA

        @Deprecated
        public static final Metric<java.lang.String> COMMENT_LINES_DATA
        Deprecated.
        in 7.3. Measures are no longer sent within analysis reports, and by consequence no longer persisted nor available from web API.
        Information about comments in file. Key-value pairs, where key - is a number of line, and value - is an indicator of whether line contains comment (1) or not (0). If a line number is missing in the map it is equivalent to the default value (0).
        Since:
        2.14
        See Also:
        FileLinesContext
      • EXECUTABLE_LINES_DATA_KEY

        public static final java.lang.String EXECUTABLE_LINES_DATA_KEY
        Since:
        5.5
        See Also:
        Constant Field Values
      • EXECUTABLE_LINES_DATA

        public static final Metric<java.lang.String> EXECUTABLE_LINES_DATA
        Information about executable lines of code in file. Key-value pairs, where key - is a number of line, and value - is an indicator of whether line contains executable code (1) or not (0). If a line number is missing in the map it is equivalent to the default value (0).
        Since:
        5.5
        See Also:
        FileLinesContext
      • ALERT_STATUS_KEY

        public static final java.lang.String ALERT_STATUS_KEY
        See Also:
        Constant Field Values
      • QUALITY_GATE_DETAILS_KEY

        public static final java.lang.String QUALITY_GATE_DETAILS_KEY
        Since:
        4.4
        See Also:
        Constant Field Values
      • QUALITY_GATE_DETAILS

        public static final Metric<java.lang.String> QUALITY_GATE_DETAILS
        The project detailed status with regard to its quality gate. Storing the global quality gate status, along with all evaluated conditions, into a JSON object.
        Since:
        4.4
      • QUALITY_PROFILES_KEY

        @Deprecated(since="5.5")
        public static final java.lang.String QUALITY_PROFILES_KEY
        Deprecated.
        since 5.5
        Since:
        4.4
        See Also:
        Constant Field Values
      • QUALITY_PROFILES

        @Deprecated(since="5.5")
        public static final Metric<java.lang.String> QUALITY_PROFILES
        Deprecated.
        since 5.5
        Since:
        4.4
      • LAST_COMMIT_DATE_KEY

        public static final java.lang.String LAST_COMMIT_DATE_KEY
        Since:
        5.2
        See Also:
        Constant Field Values
      • LAST_COMMIT_DATE

        public static final Metric LAST_COMMIT_DATE
        Date of the most recent commit. Current implementation is based on commits touching lines of source code. It ignores other changes like file renaming or file deletion.
        Since:
        5.2
      • ANALYSIS_FROM_SONARQUBE_9_4_KEY

        public static final java.lang.String ANALYSIS_FROM_SONARQUBE_9_4_KEY
        Since:
        9.4
        See Also:
        Constant Field Values
      • ANALYSIS_FROM_SONARQUBE_9_4

        public static final Metric<java.lang.Integer> ANALYSIS_FROM_SONARQUBE_9_4
        Since:
        9.4 This hidden metric that is only needed to fully fix the issue with identifying new issues when using reference branch that was haunting us in 9.3 and before. More details in the ticket SONAR-16039
      • PULL_REQUEST_FIXED_ISSUES_KEY

        public static final java.lang.String PULL_REQUEST_FIXED_ISSUES_KEY
        Since:
        10.4 This metric is only needed to present additional information for pull requests about number of issues that pull request might be fixing.
        See Also:
        Constant Field Values
      • PULL_REQUEST_FIXED_ISSUES

        public static final Metric<Metric.Level> PULL_REQUEST_FIXED_ISSUES
    • Method Detail

      • getMetrics

        public static java.util.List<Metric> getMetrics()
      • getMetric

        public static Metric getMetric​(java.lang.String key)