You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

domains.ts 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2022 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import { MetricKey } from '../../../types/metrics';
  21. interface Domains {
  22. [domain: string]: { categories?: string[]; order: string[] };
  23. }
  24. export const domains: Domains = {
  25. Reliability: {
  26. categories: ['new_code_category', 'overall_category'],
  27. order: [
  28. 'new_code_category',
  29. MetricKey.new_bugs,
  30. MetricKey.new_reliability_rating,
  31. MetricKey.new_reliability_remediation_effort,
  32. 'overall_category',
  33. MetricKey.bugs,
  34. MetricKey.reliability_rating,
  35. MetricKey.reliability_remediation_effort
  36. ]
  37. },
  38. Security: {
  39. categories: ['new_code_category', 'overall_category'],
  40. order: [
  41. 'new_code_category',
  42. MetricKey.new_vulnerabilities,
  43. MetricKey.new_security_rating,
  44. MetricKey.new_security_remediation_effort,
  45. 'overall_category',
  46. MetricKey.vulnerabilities,
  47. MetricKey.security_rating,
  48. MetricKey.security_remediation_effort
  49. ]
  50. },
  51. SecurityReview: {
  52. categories: ['new_code_category', 'overall_category'],
  53. order: [
  54. 'new_code_category',
  55. MetricKey.new_security_hotspots,
  56. MetricKey.new_security_review_rating,
  57. MetricKey.new_security_hotspots_reviewed,
  58. 'overall_category',
  59. MetricKey.security_hotspots,
  60. MetricKey.security_review_rating,
  61. MetricKey.security_hotspots_reviewed
  62. ]
  63. },
  64. Maintainability: {
  65. categories: ['new_code_category', 'overall_category'],
  66. order: [
  67. 'new_code_category',
  68. MetricKey.new_code_smells,
  69. MetricKey.new_technical_debt,
  70. MetricKey.new_sqale_debt_ratio,
  71. MetricKey.new_maintainability_rating,
  72. 'overall_category',
  73. MetricKey.code_smells,
  74. MetricKey.sqale_index,
  75. MetricKey.sqale_debt_ratio,
  76. MetricKey.sqale_rating,
  77. MetricKey.effort_to_reach_maintainability_rating_a
  78. ]
  79. },
  80. Coverage: {
  81. categories: ['new_code_category', 'overall_category', 'tests_category'],
  82. order: [
  83. 'new_code_category',
  84. MetricKey.new_coverage,
  85. MetricKey.new_lines_to_cover,
  86. MetricKey.new_uncovered_lines,
  87. MetricKey.new_line_coverage,
  88. MetricKey.new_conditions_to_cover,
  89. MetricKey.new_uncovered_conditions,
  90. MetricKey.new_branch_coverage,
  91. 'overall_category',
  92. MetricKey.coverage,
  93. MetricKey.lines_to_cover,
  94. MetricKey.uncovered_lines,
  95. MetricKey.line_coverage,
  96. MetricKey.conditions_to_cover,
  97. MetricKey.uncovered_conditions,
  98. MetricKey.branch_coverage,
  99. 'tests_category',
  100. MetricKey.tests,
  101. MetricKey.test_errors,
  102. MetricKey.test_failures,
  103. MetricKey.skipped_tests,
  104. MetricKey.test_success_density,
  105. MetricKey.test_execution_time
  106. ]
  107. },
  108. Duplications: {
  109. categories: ['new_code_category', 'overall_category'],
  110. order: [
  111. 'new_code_category',
  112. MetricKey.new_duplicated_lines_density,
  113. MetricKey.new_duplicated_lines,
  114. MetricKey.new_duplicated_blocks,
  115. 'overall_category',
  116. MetricKey.duplicated_lines_density,
  117. MetricKey.duplicated_lines,
  118. MetricKey.duplicated_blocks,
  119. MetricKey.duplicated_files
  120. ]
  121. },
  122. Size: {
  123. order: [
  124. MetricKey.new_lines,
  125. MetricKey.ncloc,
  126. MetricKey.lines,
  127. MetricKey.statements,
  128. MetricKey.functions,
  129. MetricKey.classes,
  130. MetricKey.files,
  131. MetricKey.directories
  132. ]
  133. },
  134. Complexity: {
  135. order: ['complexity', 'function_complexity', 'file_complexity', 'class_complexity']
  136. },
  137. Releasability: {
  138. order: ['releasability_rating', 'releasability_effort', 'alert_status']
  139. },
  140. Issues: {
  141. order: [
  142. MetricKey.new_violations,
  143. MetricKey.new_blocker_violations,
  144. MetricKey.new_critical_violations,
  145. MetricKey.new_major_violations,
  146. MetricKey.new_minor_violations,
  147. MetricKey.new_info_violations,
  148. MetricKey.violations,
  149. MetricKey.blocker_violations,
  150. MetricKey.critical_violations,
  151. MetricKey.major_violations,
  152. MetricKey.minor_violations,
  153. MetricKey.info_violations,
  154. MetricKey.open_issues,
  155. MetricKey.reopened_issues,
  156. MetricKey.confirmed_issues,
  157. MetricKey.false_positive_issues
  158. ]
  159. }
  160. };