package sonargo

var metrics = []string{
	"complexity",
	"cognitive_complexity",
	"duplicated_blocks",
	"duplicated_files",
	"duplicated_lines",
	"duplicated_lines_density",
	"new_violations",
	"new_xxx_violations",
	"violations",
	"xxx_issues",
	"false_positive_issues",
	"open_issues",
	"confirmed_issues",
	"reopened_issues",
	"code_smells",
	"new_code_smells",
	"sqale_rating",
	"sqale_index",
	"new_technical_debt",
	"sqale_debt_ratio",
	"new_sqale_debt_ratio",
	"alert_status",
	"quality_gate_details",
	"bugs",
	"new_bugs",
	"reliability_rating",
	"reliability_remediation_effort",
	"new_reliability_remediation_effort",
	"vulnerabilities",
	"new_vulnerabilities",
	"security_rating",
	"security_remediation_effort",
	"new_security_remediation_effort",
	"classes",
	"comment_lines",
	"comment_lines_density",
	"directories",
	"files",
	"lines",
	"ncloc",
	"ncloc_language_distribution",
	"functions",
	"projects",
	"statements",
	"branch_coverage",
	"new_branch_coverage",
	"branch_coverage_hits_data",
	"conditions_by_line",
	"covered_conditions_by_line",
	"coverage",
	"new_coverage",
	"new_line_coverage",
	"coverage_line_hits_data",
	"lines_to_cover",
	"new_lines_to_cover",
	"skipped_tests",
	"uncovered_conditions",
	"new_uncovered_conditions",
	"uncovered_lines",
	"new_uncovered_lines",
	"tests",
	"test_execution_time",
	"test_errors",
	"test_failures",
	"test_success_density",
}

var metricsDescription = []string{
	"It is the Cyclomatic Complexity calculated based on the number of paths through the code. Whenever the control flow of a function splits, the complexity counter gets incremented by one. Each function has a minimum complexity of 1. This calculation varies slightly by language because keywords and functionalities do.",
	"How hard it is to understand the code's control flow. See the Cognitive Complexity White Paper for a complete description of the mathematical model applied to compute this measure.",
	"Number of duplicated blocks of lines.",
	"Number of files involved in duplications.",
	"Number of lines involved in duplications.",
	"= duplicated_lines / lines * 100",
	"Number of issues raised for the first time in the New Code period.",
	"Number of issues of the specified severity raised for the first time in the New Code period, where xxx is one of: blocker, critical, major, minor, info.",
	"Total count of issues in all states.",
	"Total count of issues of the specified severity, where xxx is one of: blocker, critical, major, minor, info.",
	"Total count of issues marked False Positive",
	"Total count of issues in the Open state.",
	"Total count of issues in the Confirmed state.",
	"Total count of issues in the Reopened state",
	"Total count of Code Smell issues.",
	"Total count of Code Smell issues raised for the first time in the New Code period.",
	"(Formerly the SQALE rating.)\nRating given to your project related to the value of your Technical Debt Ratio. The default Maintainability Rating grid is:",
	"Effort to fix all Code Smells. The measure is stored in minutes in the database. An 8-hour day is assumed when values are shown in days.",
	"Effort to fix all Code Smells raised for the first time in the New Code period.",
	"Ratio between the cost to develop the software and the cost to fix it. The Technical Debt Ratio formula is:\n\nRemediation cost / Development cost\n\nWhich can be restated as:\n\nRemediation cost / (Cost to develop 1 line of code * Number of lines of code)\n\nThe value of the cost to develop a line of code is 0.06 days.",
	"Ratio between the cost to develop the code changed in the New Code period and the cost of the issues linked to it.",
	"State of the Quality Gate associated to your Project. Possible values are : ERROR, WARN, OK",
	"For all the conditions of your Quality Gate, you know which condition is failing and which is not.",
	"Number of bug issues.",
	"Number of new bug issues.",
	"A = 0 Bugs\n\nB = at least 1 Minor Bug\n\nC = at least 1 Major Bug\n\nD = at least 1 Critical Bug\n\nE = at least 1 Blocker Bug  ",
	"Effort to fix all bug issues. The measure is stored in minutes in the DB. An 8-hour day is assumed when values are shown in days.",
	"Same as Reliability remediation effort but on the code changed in the New Code period.",
	"Number of vulnerability issues.",
	"Number of new vulnerability issues.",
	"A = 0 Vulnerabilities\n\nB = at least 1 Minor Vulnerability\n\nC = at least 1 Major Vulnerability\n\nD = at least 1 Critical Vulnerability\n\nE = at least 1 Blocker Vulnerability  ",
	"Effort to fix all vulnerability issues. The measure is stored in minutes in the DB. An 8-hour day is assumed when values are shown in days.",
	"Same as Security remediation effort but on the code changed in the New Code period.",
	"Number of classes (including nested classes, interfaces, enums and annotations).",
	"Number of lines containing either comment or commented-out code.",
	"Density of comment lines = Comment lines / (Lines of code + Comment lines) * 100",
	"Number of directories.",
	"Number of files.",
	"Number of physical lines (number of carriage returns).",
	"Number of physical lines that contain at least one character which is neither a whitespace nor a tabulation nor part of a comment.",
	"Non Commenting Lines of Code Distributed By Language",
	"Number of functions. Depending on the language, a function is either a function or a method or a paragraph.",
	"Number of projects in a Portfolio.",
	"Number of statements.",
	"On each line of code containing some boolean expressions, the condition coverage simply answers the following question: 'Has each boolean expression been evaluated both to true and false?'. This is the density of possible conditions in flow control structures that have been followed during unit tests execution.",
	"Identical to Condition coverage but restricted to new / updated source code.",
	"List of covered conditions.",
	"Number of conditions by line.",
	"Number of covered conditions by line.",
	"It is a mix of Line coverage and Condition coverage. Its goal is to provide an even more accurate answer to the following question: How much of the source code has been covered by the unit tests?",
	"Identical to Coverage but restricted to new / updated source code.",
	"Identical to Line coverage but restricted to new / updated source code.",
	"List of covered lines.",
	"Number of lines of code which could be covered by unit tests (for example, blank lines or full comments lines are not considered as lines to cover).",
	"Identical to Lines to cover but restricted to new / updated source code.",
	"Number of skipped unit tests.",
	"Number of conditions which are not covered by unit tests.",
	"Identical to Uncovered conditions but restricted to new / updated source code.",
	"Number of lines of code which are not covered by unit tests.",
	"Identical to Uncovered lines but restricted to new / updated source code.",
	"Number of unit tests.",
	"Time required to execute all the unit tests.",
	"Number of unit tests that have failed.",
	"Number of unit tests that have failed with an unexpected exception.",
	"Test success density = (Unit tests - (Unit test errors + Unit test failures)) / Unit tests * 100",
}

var metricNames = []string{
	"Complexity",
	"Cognitive Complexity",
	"Duplicated blocks",
	"Duplicated files",
	"Duplicated lines",
	"Duplicated lines (%)",
	"New issues",
	"New xxx issues",
	"Issues",
	"xxx issues",
	"False positive issues",
	"Open issues",
	"Confirmed issues",
	"Reopened issues",
	"Code Smells",
	"New Code Smells",
	"Maintainability Rating",
	"Technical Debt",
	"Technical Debt on New Code",
	"Technical Debt Ratio",
	"Technical Debt Ratio on New Code",
	"Quality Gate Status",
	"Quality Gate Details",
	"Bugs",
	"New Bugs",
	"Reliability Rating",
	"Reliability remediation effort",
	"Reliability remediation effort on new code",
	"Vulnerabilities",
	"New Vulnerabilities",
	"Security Rating",
	"Security remediation effort",
	"Security remedation effort on new code",
	"Classes",
	"Comment lines",
	"Comments (%)",
	"Directories",
	"Files",
	"Lines",
	"Lines of code",
	"Lines of code per language",
	"Functions",
	"Projects",
	"Statements",
	"Condition coverage",
	"Condition coverage on new code",
	"Condition coverage hits",
	"Conditions by line",
	"Covered conditions by line",
	"Coverage",
	"Coverage on new code",
	"Line coverage on new code",
	"Line coverage hits",
	"Lines to cover",
	"Lines to cover on new code",
	"Skipped unit tests",
	"Uncovered conditions",
	"Uncovered conditions on new code",
	"Uncovered lines",
	"Uncovered lines on new code",
	"Unit tests",
	"Unit tests duration",
	"Unit test errors",
	"Unit test failures",
	"Unit test success density (%)",
}

const (
	MetricTypeINT      = "INT"
	MetricTypeFLOAT    = "FLOAT"
	MetricTypePERCENT  = "PERCENT"
	MetricTypeBOOL     = "BOOL"
	MetricTypeSTRING   = "STRING"
	MetricTypeMILLISEC = "MILLISEC"
	MetricTypeDATA     = "DATA"
	MetricTypeLEVEL    = "LEVEL"
	MetricTypeDISTRIB  = "DISTRIB"
	MetricTypeRATING   = "RATING"
	MetricTypeWORK_DUR = "WORK_DUR"
)
