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.

metrics.ts 35KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2024 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 { Dict, Metric } from '../../types/types';
  21. export const DEFAULT_METRICS: Dict<Metric> = {
  22. new_technical_debt: {
  23. key: 'new_technical_debt',
  24. type: 'WORK_DUR',
  25. name: 'Added Technical Debt',
  26. description: 'Added technical debt',
  27. domain: 'Maintainability',
  28. direction: -1,
  29. qualitative: true,
  30. hidden: false,
  31. },
  32. blocker_violations: {
  33. key: 'blocker_violations',
  34. type: 'INT',
  35. name: 'Blocker Issues',
  36. description: 'Blocker issues',
  37. domain: 'Issues',
  38. direction: -1,
  39. qualitative: true,
  40. hidden: false,
  41. },
  42. bugs: {
  43. key: 'bugs',
  44. type: 'INT',
  45. name: 'Bugs',
  46. description: 'Bugs',
  47. domain: 'Reliability',
  48. direction: -1,
  49. qualitative: false,
  50. hidden: false,
  51. },
  52. classes: {
  53. key: 'classes',
  54. type: 'INT',
  55. name: 'Classes',
  56. description: 'Classes',
  57. domain: 'Size',
  58. direction: -1,
  59. qualitative: false,
  60. hidden: false,
  61. },
  62. code_smells: {
  63. key: 'code_smells',
  64. type: 'INT',
  65. name: 'Code Smells',
  66. description: 'Code Smells',
  67. domain: 'Maintainability',
  68. direction: -1,
  69. qualitative: false,
  70. hidden: false,
  71. },
  72. cognitive_complexity: {
  73. key: 'cognitive_complexity',
  74. type: 'INT',
  75. name: 'Cognitive Complexity',
  76. description: 'Cognitive complexity',
  77. domain: 'Complexity',
  78. direction: -1,
  79. qualitative: false,
  80. hidden: false,
  81. },
  82. comment_lines: {
  83. key: 'comment_lines',
  84. type: 'INT',
  85. name: 'Comment Lines',
  86. description: 'Number of comment lines',
  87. domain: 'Size',
  88. direction: 1,
  89. qualitative: false,
  90. hidden: false,
  91. },
  92. comment_lines_data: {
  93. key: 'comment_lines_data',
  94. type: 'DATA',
  95. name: 'comment_lines_data',
  96. domain: 'Size',
  97. direction: 0,
  98. qualitative: false,
  99. hidden: true,
  100. },
  101. comment_lines_density: {
  102. key: 'comment_lines_density',
  103. type: 'PERCENT',
  104. name: 'Comments (%)',
  105. description: 'Comments balanced by ncloc + comment lines',
  106. domain: 'Size',
  107. direction: 1,
  108. qualitative: true,
  109. hidden: false,
  110. decimalScale: 1,
  111. },
  112. class_complexity: {
  113. key: 'class_complexity',
  114. type: 'FLOAT',
  115. name: 'Complexity / Class',
  116. description: 'Complexity average by class',
  117. domain: 'Complexity',
  118. direction: -1,
  119. qualitative: true,
  120. hidden: true,
  121. decimalScale: 1,
  122. },
  123. file_complexity: {
  124. key: 'file_complexity',
  125. type: 'FLOAT',
  126. name: 'Complexity / File',
  127. description: 'Complexity average by file',
  128. domain: 'Complexity',
  129. direction: -1,
  130. qualitative: true,
  131. hidden: true,
  132. decimalScale: 1,
  133. },
  134. function_complexity: {
  135. key: 'function_complexity',
  136. type: 'FLOAT',
  137. name: 'Complexity / Function',
  138. description: 'Complexity average by function',
  139. domain: 'Complexity',
  140. direction: -1,
  141. qualitative: true,
  142. hidden: true,
  143. decimalScale: 1,
  144. },
  145. complexity_in_classes: {
  146. key: 'complexity_in_classes',
  147. type: 'INT',
  148. name: 'Complexity in Classes',
  149. description: 'Cyclomatic complexity in classes',
  150. domain: 'Complexity',
  151. direction: -1,
  152. qualitative: false,
  153. hidden: true,
  154. },
  155. complexity_in_functions: {
  156. key: 'complexity_in_functions',
  157. type: 'INT',
  158. name: 'Complexity in Functions',
  159. description: 'Cyclomatic complexity in functions',
  160. domain: 'Complexity',
  161. direction: -1,
  162. qualitative: false,
  163. hidden: true,
  164. },
  165. branch_coverage: {
  166. key: 'branch_coverage',
  167. type: 'PERCENT',
  168. name: 'Condition Coverage',
  169. description: 'Condition coverage',
  170. domain: 'Coverage',
  171. direction: 1,
  172. qualitative: true,
  173. hidden: false,
  174. decimalScale: 1,
  175. },
  176. new_branch_coverage: {
  177. key: 'new_branch_coverage',
  178. type: 'PERCENT',
  179. name: 'Condition Coverage on New Code',
  180. description: 'Condition coverage of new/changed code',
  181. domain: 'Coverage',
  182. direction: 1,
  183. qualitative: true,
  184. hidden: false,
  185. decimalScale: 1,
  186. },
  187. conditions_to_cover: {
  188. key: 'conditions_to_cover',
  189. type: 'INT',
  190. name: 'Conditions to Cover',
  191. description: 'Conditions to cover',
  192. domain: 'Coverage',
  193. direction: -1,
  194. qualitative: false,
  195. hidden: false,
  196. },
  197. new_conditions_to_cover: {
  198. key: 'new_conditions_to_cover',
  199. type: 'INT',
  200. name: 'Conditions to Cover on New Code',
  201. description: 'Conditions to cover on new code',
  202. domain: 'Coverage',
  203. direction: -1,
  204. qualitative: false,
  205. hidden: false,
  206. },
  207. confirmed_issues: {
  208. key: 'confirmed_issues',
  209. type: 'INT',
  210. name: 'Confirmed Issues',
  211. description: 'Confirmed issues',
  212. domain: 'Issues',
  213. direction: -1,
  214. qualitative: true,
  215. hidden: false,
  216. },
  217. coverage: {
  218. key: 'coverage',
  219. type: 'PERCENT',
  220. name: 'Coverage',
  221. description: 'Coverage by tests',
  222. domain: 'Coverage',
  223. direction: 1,
  224. qualitative: true,
  225. hidden: false,
  226. decimalScale: 1,
  227. },
  228. new_coverage: {
  229. key: 'new_coverage',
  230. type: 'PERCENT',
  231. name: 'Coverage on New Code',
  232. description: 'Coverage of new/changed code',
  233. domain: 'Coverage',
  234. direction: 1,
  235. qualitative: true,
  236. hidden: false,
  237. decimalScale: 1,
  238. },
  239. critical_violations: {
  240. key: 'critical_violations',
  241. type: 'INT',
  242. name: 'Critical Issues',
  243. description: 'Critical issues',
  244. domain: 'Issues',
  245. direction: -1,
  246. qualitative: true,
  247. hidden: false,
  248. },
  249. complexity: {
  250. key: 'complexity',
  251. type: 'INT',
  252. name: 'Cyclomatic Complexity',
  253. description: 'Cyclomatic complexity',
  254. domain: 'Complexity',
  255. direction: -1,
  256. qualitative: false,
  257. hidden: false,
  258. },
  259. last_commit_date: {
  260. key: 'last_commit_date',
  261. type: 'MILLISEC',
  262. name: 'Date of Last Commit',
  263. domain: 'SCM',
  264. direction: 0,
  265. qualitative: false,
  266. hidden: true,
  267. },
  268. development_cost: {
  269. key: 'development_cost',
  270. type: 'STRING',
  271. name: 'Development Cost',
  272. description: 'Development cost',
  273. domain: 'Maintainability',
  274. direction: -1,
  275. qualitative: true,
  276. hidden: true,
  277. },
  278. new_development_cost: {
  279. key: 'new_development_cost',
  280. type: 'FLOAT',
  281. name: 'Development Cost on New Code',
  282. description: 'Development cost on new code',
  283. domain: 'Maintainability',
  284. direction: -1,
  285. qualitative: true,
  286. hidden: true,
  287. decimalScale: 1,
  288. },
  289. directories: {
  290. key: 'directories',
  291. type: 'INT',
  292. name: 'Directories',
  293. description: 'Directories',
  294. domain: 'Size',
  295. direction: -1,
  296. qualitative: false,
  297. hidden: false,
  298. },
  299. duplicated_blocks: {
  300. key: 'duplicated_blocks',
  301. type: 'INT',
  302. name: 'Duplicated Blocks',
  303. description: 'Duplicated blocks',
  304. domain: 'Duplications',
  305. direction: -1,
  306. qualitative: true,
  307. hidden: false,
  308. },
  309. new_duplicated_blocks: {
  310. key: 'new_duplicated_blocks',
  311. type: 'INT',
  312. name: 'Duplicated Blocks on New Code',
  313. description: 'Duplicated blocks on new code',
  314. domain: 'Duplications',
  315. direction: -1,
  316. qualitative: true,
  317. hidden: false,
  318. },
  319. duplicated_files: {
  320. key: 'duplicated_files',
  321. type: 'INT',
  322. name: 'Duplicated Files',
  323. description: 'Duplicated files',
  324. domain: 'Duplications',
  325. direction: -1,
  326. qualitative: true,
  327. hidden: false,
  328. },
  329. duplicated_lines: {
  330. key: 'duplicated_lines',
  331. type: 'INT',
  332. name: 'Duplicated Lines',
  333. description: 'Duplicated lines',
  334. domain: 'Duplications',
  335. direction: -1,
  336. qualitative: true,
  337. hidden: false,
  338. },
  339. duplicated_lines_density: {
  340. key: 'duplicated_lines_density',
  341. type: 'PERCENT',
  342. name: 'Duplicated Lines (%)',
  343. description: 'Duplicated lines balanced by statements',
  344. domain: 'Duplications',
  345. direction: -1,
  346. qualitative: true,
  347. hidden: false,
  348. decimalScale: 1,
  349. },
  350. new_duplicated_lines_density: {
  351. key: 'new_duplicated_lines_density',
  352. type: 'PERCENT',
  353. name: 'Duplicated Lines (%) on New Code',
  354. description: 'Duplicated lines (%) on new code balanced by statements',
  355. domain: 'Duplications',
  356. direction: -1,
  357. qualitative: true,
  358. hidden: false,
  359. decimalScale: 1,
  360. },
  361. new_duplicated_lines: {
  362. key: 'new_duplicated_lines',
  363. type: 'INT',
  364. name: 'Duplicated Lines on New Code',
  365. description: 'Duplicated Lines on New Code',
  366. domain: 'Duplications',
  367. direction: -1,
  368. qualitative: true,
  369. hidden: false,
  370. },
  371. duplications_data: {
  372. key: 'duplications_data',
  373. type: 'DATA',
  374. name: 'Duplication Details',
  375. description: 'Duplications details',
  376. domain: 'Duplications',
  377. direction: 0,
  378. qualitative: false,
  379. hidden: false,
  380. },
  381. effort_to_reach_maintainability_rating_a: {
  382. key: 'effort_to_reach_maintainability_rating_a',
  383. type: 'WORK_DUR',
  384. name: 'Effort to Reach Maintainability Rating A',
  385. description: 'Effort to reach maintainability rating A',
  386. domain: 'Maintainability',
  387. direction: -1,
  388. qualitative: true,
  389. hidden: false,
  390. },
  391. executable_lines_data: {
  392. key: 'executable_lines_data',
  393. type: 'DATA',
  394. name: 'executable_lines_data',
  395. domain: 'Coverage',
  396. direction: 0,
  397. qualitative: false,
  398. hidden: true,
  399. },
  400. false_positive_issues: {
  401. key: 'false_positive_issues',
  402. type: 'INT',
  403. name: 'False Positive Issues',
  404. description: 'False positive issues',
  405. domain: 'Issues',
  406. direction: -1,
  407. qualitative: false,
  408. hidden: false,
  409. },
  410. file_complexity_distribution: {
  411. key: 'file_complexity_distribution',
  412. type: 'DISTRIB',
  413. name: 'File Distribution / Complexity',
  414. description: 'Files distribution /complexity',
  415. domain: 'Complexity',
  416. direction: 0,
  417. qualitative: true,
  418. hidden: true,
  419. },
  420. files: {
  421. key: 'files',
  422. type: 'INT',
  423. name: 'Files',
  424. description: 'Number of files',
  425. domain: 'Size',
  426. direction: -1,
  427. qualitative: false,
  428. hidden: false,
  429. },
  430. function_complexity_distribution: {
  431. key: 'function_complexity_distribution',
  432. type: 'DISTRIB',
  433. name: 'Function Distribution / Complexity',
  434. description: 'Functions distribution /complexity',
  435. domain: 'Complexity',
  436. direction: 0,
  437. qualitative: true,
  438. hidden: true,
  439. },
  440. functions: {
  441. key: 'functions',
  442. type: 'INT',
  443. name: 'Functions',
  444. description: 'Functions',
  445. domain: 'Size',
  446. direction: -1,
  447. qualitative: false,
  448. hidden: false,
  449. },
  450. generated_lines: {
  451. key: 'generated_lines',
  452. type: 'INT',
  453. name: 'Generated Lines',
  454. description: 'Number of generated lines',
  455. domain: 'Size',
  456. direction: -1,
  457. qualitative: false,
  458. hidden: false,
  459. },
  460. generated_ncloc: {
  461. key: 'generated_ncloc',
  462. type: 'INT',
  463. name: 'Generated Lines of Code',
  464. description: 'Generated non Commenting Lines of Code',
  465. domain: 'Size',
  466. direction: -1,
  467. qualitative: false,
  468. hidden: false,
  469. },
  470. info_violations: {
  471. key: 'info_violations',
  472. type: 'INT',
  473. name: 'Info Issues',
  474. description: 'Info issues',
  475. domain: 'Issues',
  476. direction: 0,
  477. qualitative: true,
  478. hidden: false,
  479. },
  480. violations: {
  481. key: 'violations',
  482. type: 'INT',
  483. name: 'Issues',
  484. description: 'Issues',
  485. domain: 'Issues',
  486. direction: -1,
  487. qualitative: true,
  488. hidden: false,
  489. },
  490. last_change_on_maintainability_rating: {
  491. key: 'last_change_on_maintainability_rating',
  492. type: 'DATA',
  493. name: 'Last Change on Maintainability Rating',
  494. domain: 'Maintainability',
  495. direction: 0,
  496. qualitative: false,
  497. hidden: true,
  498. },
  499. last_change_on_releasability_rating: {
  500. key: 'last_change_on_releasability_rating',
  501. type: 'DATA',
  502. name: 'Last Change on Releasability Rating',
  503. domain: 'Releasability',
  504. direction: 0,
  505. qualitative: false,
  506. hidden: true,
  507. },
  508. last_change_on_reliability_rating: {
  509. key: 'last_change_on_reliability_rating',
  510. type: 'DATA',
  511. name: 'Last Change on Reliability Rating',
  512. domain: 'Reliability',
  513. direction: 0,
  514. qualitative: false,
  515. hidden: true,
  516. },
  517. last_change_on_security_rating: {
  518. key: 'last_change_on_security_rating',
  519. type: 'DATA',
  520. name: 'Last Change on Security Rating',
  521. domain: 'Security',
  522. direction: 0,
  523. qualitative: false,
  524. hidden: true,
  525. },
  526. last_change_on_security_review_rating: {
  527. key: 'last_change_on_security_review_rating',
  528. type: 'DATA',
  529. name: 'Last Change on Security Review Rating',
  530. domain: 'Security',
  531. direction: 0,
  532. qualitative: false,
  533. hidden: true,
  534. },
  535. line_coverage: {
  536. key: 'line_coverage',
  537. type: 'PERCENT',
  538. name: 'Line Coverage',
  539. description: 'Line coverage',
  540. domain: 'Coverage',
  541. direction: 1,
  542. qualitative: true,
  543. hidden: false,
  544. decimalScale: 1,
  545. },
  546. new_line_coverage: {
  547. key: 'new_line_coverage',
  548. type: 'PERCENT',
  549. name: 'Line Coverage on New Code',
  550. description: 'Line coverage of added/changed code',
  551. domain: 'Coverage',
  552. direction: 1,
  553. qualitative: true,
  554. hidden: false,
  555. decimalScale: 1,
  556. },
  557. lines: {
  558. key: 'lines',
  559. type: 'INT',
  560. name: 'Lines',
  561. description: 'Lines',
  562. domain: 'Size',
  563. direction: -1,
  564. qualitative: false,
  565. hidden: false,
  566. },
  567. ncloc: {
  568. key: 'ncloc',
  569. type: 'INT',
  570. name: 'Lines of Code',
  571. description: 'Non commenting lines of code',
  572. domain: 'Size',
  573. direction: -1,
  574. qualitative: false,
  575. hidden: false,
  576. },
  577. ncloc_language_distribution: {
  578. key: 'ncloc_language_distribution',
  579. type: 'DATA',
  580. name: 'Lines of Code Per Language',
  581. description: 'Non Commenting Lines of Code Distributed By Language',
  582. domain: 'Size',
  583. direction: -1,
  584. qualitative: false,
  585. hidden: false,
  586. },
  587. lines_to_cover: {
  588. key: 'lines_to_cover',
  589. type: 'INT',
  590. name: 'Lines to Cover',
  591. description: 'Lines to cover',
  592. domain: 'Coverage',
  593. direction: -1,
  594. qualitative: false,
  595. hidden: false,
  596. },
  597. new_lines_to_cover: {
  598. key: 'new_lines_to_cover',
  599. type: 'INT',
  600. name: 'Lines to Cover on New Code',
  601. description: 'Lines to cover on new code',
  602. domain: 'Coverage',
  603. direction: -1,
  604. qualitative: false,
  605. hidden: false,
  606. },
  607. leak_projects: {
  608. key: 'leak_projects',
  609. type: 'DATA',
  610. name: 'List of technical projects with their leaks',
  611. direction: 0,
  612. qualitative: false,
  613. hidden: true,
  614. },
  615. sqale_rating: {
  616. key: 'sqale_rating',
  617. type: 'RATING',
  618. name: 'Maintainability Rating',
  619. description: 'A-to-E rating based on the technical debt ratio',
  620. domain: 'Maintainability',
  621. direction: 0,
  622. qualitative: true,
  623. hidden: false,
  624. },
  625. maintainability_rating_distribution: {
  626. key: 'maintainability_rating_distribution',
  627. type: 'DATA',
  628. name: 'Maintainability Rating Distribution',
  629. description: 'Maintainability rating distribution',
  630. domain: 'Maintainability',
  631. direction: -1,
  632. qualitative: true,
  633. hidden: true,
  634. },
  635. new_maintainability_rating_distribution: {
  636. key: 'new_maintainability_rating_distribution',
  637. type: 'DATA',
  638. name: 'Maintainability Rating Distribution on New Code',
  639. description: 'Maintainability rating distribution on new code',
  640. domain: 'Maintainability',
  641. direction: -1,
  642. qualitative: true,
  643. hidden: true,
  644. },
  645. new_maintainability_rating: {
  646. key: 'new_maintainability_rating',
  647. type: 'RATING',
  648. name: 'Maintainability Rating on New Code',
  649. description: 'Maintainability rating on new code',
  650. domain: 'Maintainability',
  651. direction: -1,
  652. qualitative: true,
  653. hidden: false,
  654. },
  655. major_violations: {
  656. key: 'major_violations',
  657. type: 'INT',
  658. name: 'Major Issues',
  659. description: 'Major issues',
  660. domain: 'Issues',
  661. direction: -1,
  662. qualitative: true,
  663. hidden: false,
  664. },
  665. minor_violations: {
  666. key: 'minor_violations',
  667. type: 'INT',
  668. name: 'Minor Issues',
  669. description: 'Minor issues',
  670. domain: 'Issues',
  671. direction: -1,
  672. qualitative: true,
  673. hidden: false,
  674. },
  675. ncloc_data: {
  676. key: 'ncloc_data',
  677. type: 'DATA',
  678. name: 'ncloc_data',
  679. domain: 'Size',
  680. direction: 0,
  681. qualitative: false,
  682. hidden: true,
  683. },
  684. new_blocker_violations: {
  685. key: 'new_blocker_violations',
  686. type: 'INT',
  687. name: 'New Blocker Issues',
  688. description: 'New Blocker issues',
  689. domain: 'Issues',
  690. direction: -1,
  691. qualitative: true,
  692. hidden: false,
  693. },
  694. new_bugs: {
  695. key: 'new_bugs',
  696. type: 'INT',
  697. name: 'New Bugs',
  698. description: 'New Bugs',
  699. domain: 'Reliability',
  700. direction: -1,
  701. qualitative: true,
  702. hidden: false,
  703. },
  704. new_code_smells: {
  705. key: 'new_code_smells',
  706. type: 'INT',
  707. name: 'New Code Smells',
  708. description: 'New Code Smells',
  709. domain: 'Maintainability',
  710. direction: -1,
  711. qualitative: true,
  712. hidden: false,
  713. },
  714. new_critical_violations: {
  715. key: 'new_critical_violations',
  716. type: 'INT',
  717. name: 'New Critical Issues',
  718. description: 'New Critical issues',
  719. domain: 'Issues',
  720. direction: -1,
  721. qualitative: true,
  722. hidden: false,
  723. },
  724. new_info_violations: {
  725. key: 'new_info_violations',
  726. type: 'INT',
  727. name: 'New Info Issues',
  728. description: 'New Info issues',
  729. domain: 'Issues',
  730. direction: -1,
  731. qualitative: true,
  732. hidden: false,
  733. },
  734. new_violations: {
  735. key: 'new_violations',
  736. type: 'INT',
  737. name: 'New Issues',
  738. description: 'New issues',
  739. domain: 'Issues',
  740. direction: -1,
  741. qualitative: true,
  742. hidden: false,
  743. },
  744. new_lines: {
  745. key: 'new_lines',
  746. type: 'INT',
  747. name: 'New Lines',
  748. description: 'New lines',
  749. domain: 'Size',
  750. direction: -1,
  751. qualitative: false,
  752. hidden: false,
  753. },
  754. new_major_violations: {
  755. key: 'new_major_violations',
  756. type: 'INT',
  757. name: 'New Major Issues',
  758. description: 'New Major issues',
  759. domain: 'Issues',
  760. direction: -1,
  761. qualitative: true,
  762. hidden: false,
  763. },
  764. new_minor_violations: {
  765. key: 'new_minor_violations',
  766. type: 'INT',
  767. name: 'New Minor Issues',
  768. description: 'New Minor issues',
  769. domain: 'Issues',
  770. direction: -1,
  771. qualitative: true,
  772. hidden: false,
  773. },
  774. new_security_hotspots: {
  775. key: 'new_security_hotspots',
  776. type: 'INT',
  777. name: 'New Security Hotspots',
  778. description: 'New Security Hotspots',
  779. domain: 'SecurityReview',
  780. direction: -1,
  781. qualitative: true,
  782. hidden: false,
  783. },
  784. new_vulnerabilities: {
  785. key: 'new_vulnerabilities',
  786. type: 'INT',
  787. name: 'New Vulnerabilities',
  788. description: 'New Vulnerabilities',
  789. domain: 'Security',
  790. direction: -1,
  791. qualitative: true,
  792. hidden: false,
  793. },
  794. unanalyzed_c: {
  795. key: 'unanalyzed_c',
  796. type: 'INT',
  797. name: 'Number of unanalyzed c files',
  798. domain: 'Size',
  799. direction: -1,
  800. qualitative: false,
  801. hidden: true,
  802. },
  803. unanalyzed_cpp: {
  804. key: 'unanalyzed_cpp',
  805. type: 'INT',
  806. name: 'Number of unanalyzed c++ files',
  807. domain: 'Size',
  808. direction: -1,
  809. qualitative: false,
  810. hidden: true,
  811. },
  812. open_issues: {
  813. key: 'open_issues',
  814. type: 'INT',
  815. name: 'Open Issues',
  816. description: 'Open issues',
  817. domain: 'Issues',
  818. direction: -1,
  819. qualitative: false,
  820. hidden: false,
  821. },
  822. quality_profiles: {
  823. key: 'quality_profiles',
  824. type: 'DATA',
  825. name: 'Profiles',
  826. description: 'Details of quality profiles used during analysis',
  827. domain: 'General',
  828. direction: 0,
  829. qualitative: false,
  830. hidden: true,
  831. },
  832. projects: {
  833. key: 'projects',
  834. type: 'INT',
  835. name: 'Project branches',
  836. description: 'Number of project branches',
  837. domain: 'Size',
  838. direction: -1,
  839. qualitative: false,
  840. hidden: false,
  841. },
  842. public_api: {
  843. key: 'public_api',
  844. type: 'INT',
  845. name: 'Public API',
  846. description: 'Public API',
  847. domain: 'Documentation',
  848. direction: -1,
  849. qualitative: false,
  850. hidden: true,
  851. },
  852. public_documented_api_density: {
  853. key: 'public_documented_api_density',
  854. type: 'PERCENT',
  855. name: 'Public Documented API (%)',
  856. description: 'Public documented classes and functions balanced by ncloc',
  857. domain: 'Documentation',
  858. direction: 1,
  859. qualitative: true,
  860. hidden: true,
  861. decimalScale: 1,
  862. },
  863. public_undocumented_api: {
  864. key: 'public_undocumented_api',
  865. type: 'INT',
  866. name: 'Public Undocumented API',
  867. description: 'Public undocumented classes, functions and variables',
  868. domain: 'Documentation',
  869. direction: -1,
  870. qualitative: true,
  871. hidden: true,
  872. },
  873. quality_gate_details: {
  874. key: 'quality_gate_details',
  875. type: 'DATA',
  876. name: 'Quality Gate Details',
  877. description: 'The project detailed status with regard to its quality gate',
  878. domain: 'General',
  879. direction: 0,
  880. qualitative: false,
  881. hidden: false,
  882. },
  883. alert_status: {
  884. key: 'alert_status',
  885. type: 'LEVEL',
  886. name: 'Quality Gate Status',
  887. description: 'The project status with regard to its quality gate.',
  888. domain: 'Releasability',
  889. direction: 1,
  890. qualitative: true,
  891. hidden: false,
  892. },
  893. releasability_rating: {
  894. key: 'releasability_rating',
  895. type: 'RATING',
  896. name: 'Releasability rating',
  897. domain: 'Releasability',
  898. direction: -1,
  899. qualitative: true,
  900. hidden: false,
  901. },
  902. releasability_rating_distribution: {
  903. key: 'releasability_rating_distribution',
  904. type: 'DATA',
  905. name: 'Releasability Rating Distribution',
  906. description: 'Releasability rating distribution',
  907. domain: 'Releasability',
  908. direction: -1,
  909. qualitative: true,
  910. hidden: true,
  911. },
  912. reliability_issues: {
  913. key: 'reliability_issues',
  914. type: 'DATA',
  915. name: 'Reliability',
  916. description: 'Reliability issues',
  917. direction: 0,
  918. qualitative: false,
  919. hidden: false,
  920. },
  921. new_reliability_issues: {
  922. key: 'new_reliability_issues',
  923. type: 'DATA',
  924. name: 'New Reliability',
  925. description: 'New Reliability issues',
  926. direction: 0,
  927. qualitative: false,
  928. hidden: false,
  929. },
  930. reliability_rating: {
  931. key: 'reliability_rating',
  932. type: 'RATING',
  933. name: 'Reliability Rating',
  934. description: 'Reliability rating',
  935. domain: 'Reliability',
  936. direction: -1,
  937. qualitative: true,
  938. hidden: false,
  939. },
  940. reliability_rating_distribution: {
  941. key: 'reliability_rating_distribution',
  942. type: 'DATA',
  943. name: 'Reliability Rating Distribution',
  944. description: 'Maintainability rating distribution',
  945. domain: 'Reliability',
  946. direction: -1,
  947. qualitative: true,
  948. hidden: true,
  949. },
  950. new_reliability_rating_distribution: {
  951. key: 'new_reliability_rating_distribution',
  952. type: 'DATA',
  953. name: 'Reliability Rating Distribution on New Code',
  954. description: 'Maintainability rating distribution on new code',
  955. domain: 'Reliability',
  956. direction: -1,
  957. qualitative: true,
  958. hidden: true,
  959. },
  960. new_reliability_rating: {
  961. key: 'new_reliability_rating',
  962. type: 'RATING',
  963. name: 'Reliability Rating on New Code',
  964. description: 'Reliability rating on new code',
  965. domain: 'Reliability',
  966. direction: -1,
  967. qualitative: true,
  968. hidden: false,
  969. },
  970. reliability_remediation_effort: {
  971. key: 'reliability_remediation_effort',
  972. type: 'WORK_DUR',
  973. name: 'Reliability Remediation Effort',
  974. description: 'Reliability Remediation Effort',
  975. domain: 'Reliability',
  976. direction: -1,
  977. qualitative: true,
  978. hidden: false,
  979. },
  980. new_reliability_remediation_effort: {
  981. key: 'new_reliability_remediation_effort',
  982. type: 'WORK_DUR',
  983. name: 'Reliability Remediation Effort on New Code',
  984. description: 'Reliability remediation effort on new code',
  985. domain: 'Reliability',
  986. direction: -1,
  987. qualitative: true,
  988. hidden: false,
  989. },
  990. reopened_issues: {
  991. key: 'reopened_issues',
  992. type: 'INT',
  993. name: 'Reopened Issues',
  994. description: 'Reopened issues',
  995. domain: 'Issues',
  996. direction: -1,
  997. qualitative: true,
  998. hidden: false,
  999. },
  1000. security_hotspots: {
  1001. key: 'security_hotspots',
  1002. type: 'INT',
  1003. name: 'Security Hotspots',
  1004. description: 'Security Hotspots',
  1005. domain: 'SecurityReview',
  1006. direction: -1,
  1007. qualitative: false,
  1008. hidden: false,
  1009. },
  1010. security_hotspots_reviewed: {
  1011. key: 'security_hotspots_reviewed',
  1012. type: 'PERCENT',
  1013. name: 'Security Hotspots Reviewed',
  1014. description: 'Percentage of Security Hotspots Reviewed',
  1015. domain: 'SecurityReview',
  1016. direction: 1,
  1017. qualitative: true,
  1018. hidden: false,
  1019. decimalScale: 1,
  1020. },
  1021. new_security_hotspots_reviewed: {
  1022. key: 'new_security_hotspots_reviewed',
  1023. type: 'PERCENT',
  1024. name: 'Security Hotspots Reviewed on New Code',
  1025. description: 'Percentage of Security Hotspots Reviewed on New Code',
  1026. domain: 'SecurityReview',
  1027. direction: 1,
  1028. qualitative: true,
  1029. hidden: false,
  1030. decimalScale: 1,
  1031. },
  1032. security_issues: {
  1033. key: 'security_issues',
  1034. type: 'DATA',
  1035. name: 'Security',
  1036. description: 'Security issues',
  1037. direction: 0,
  1038. qualitative: false,
  1039. hidden: false,
  1040. },
  1041. new_security_issues: {
  1042. key: 'new_security_issues',
  1043. type: 'DATA',
  1044. name: 'Security',
  1045. description: 'New Security issues',
  1046. domain: 'Issues',
  1047. direction: 0,
  1048. qualitative: false,
  1049. hidden: false,
  1050. },
  1051. security_rating: {
  1052. key: 'security_rating',
  1053. type: 'RATING',
  1054. name: 'Security Rating',
  1055. description: 'Security rating',
  1056. domain: 'Security',
  1057. direction: -1,
  1058. qualitative: true,
  1059. hidden: false,
  1060. },
  1061. security_rating_distribution: {
  1062. key: 'security_rating_distribution',
  1063. type: 'DATA',
  1064. name: 'Security Rating Distribution',
  1065. description: 'Security rating distribution',
  1066. domain: 'Security',
  1067. direction: -1,
  1068. qualitative: true,
  1069. hidden: true,
  1070. },
  1071. new_security_rating_distribution: {
  1072. key: 'new_security_rating_distribution',
  1073. type: 'DATA',
  1074. name: 'Security Rating Distribution on New Code',
  1075. description: 'Security rating distribution on new code',
  1076. domain: 'Security',
  1077. direction: -1,
  1078. qualitative: true,
  1079. hidden: true,
  1080. },
  1081. new_security_rating: {
  1082. key: 'new_security_rating',
  1083. type: 'RATING',
  1084. name: 'Security Rating on New Code',
  1085. description: 'Security rating on new code',
  1086. domain: 'Security',
  1087. direction: -1,
  1088. qualitative: true,
  1089. hidden: false,
  1090. },
  1091. security_remediation_effort: {
  1092. key: 'security_remediation_effort',
  1093. type: 'WORK_DUR',
  1094. name: 'Security Remediation Effort',
  1095. description: 'Security remediation effort',
  1096. domain: 'Security',
  1097. direction: -1,
  1098. qualitative: true,
  1099. hidden: false,
  1100. },
  1101. new_security_remediation_effort: {
  1102. key: 'new_security_remediation_effort',
  1103. type: 'WORK_DUR',
  1104. name: 'Security Remediation Effort on New Code',
  1105. description: 'Security remediation effort on new code',
  1106. domain: 'Security',
  1107. direction: -1,
  1108. qualitative: true,
  1109. hidden: false,
  1110. },
  1111. security_review_rating: {
  1112. key: 'security_review_rating',
  1113. type: 'RATING',
  1114. name: 'Security Review Rating',
  1115. description: 'Security Review Rating',
  1116. domain: 'SecurityReview',
  1117. direction: -1,
  1118. qualitative: true,
  1119. hidden: false,
  1120. },
  1121. security_review_rating_distribution: {
  1122. key: 'security_review_rating_distribution',
  1123. type: 'DATA',
  1124. name: 'Security Review Rating Distribution',
  1125. description: 'Security review rating distribution',
  1126. domain: 'Security',
  1127. direction: -1,
  1128. qualitative: true,
  1129. hidden: true,
  1130. },
  1131. new_security_review_rating_distribution: {
  1132. key: 'new_security_review_rating_distribution',
  1133. type: 'DATA',
  1134. name: 'Security Review Rating Distribution on New Code',
  1135. description: 'Security review rating distribution on new code',
  1136. domain: 'Security',
  1137. direction: -1,
  1138. qualitative: true,
  1139. hidden: true,
  1140. },
  1141. new_security_review_rating: {
  1142. key: 'new_security_review_rating',
  1143. type: 'RATING',
  1144. name: 'Security Review Rating on New Code',
  1145. description: 'Security Review Rating on New Code',
  1146. domain: 'SecurityReview',
  1147. direction: -1,
  1148. qualitative: true,
  1149. hidden: false,
  1150. },
  1151. security_hotspots_reviewed_status: {
  1152. key: 'security_hotspots_reviewed_status',
  1153. type: 'INT',
  1154. name: 'Security Review Reviewed Status',
  1155. description: 'Security Review Reviewed Status',
  1156. domain: 'SecurityReview',
  1157. direction: -1,
  1158. qualitative: false,
  1159. hidden: true,
  1160. },
  1161. new_security_hotspots_reviewed_status: {
  1162. key: 'new_security_hotspots_reviewed_status',
  1163. type: 'INT',
  1164. name: 'Security Review Reviewed Status on New Code',
  1165. description: 'Security Review Reviewed Status on New Code',
  1166. domain: 'SecurityReview',
  1167. direction: -1,
  1168. qualitative: false,
  1169. hidden: true,
  1170. },
  1171. security_hotspots_to_review_status: {
  1172. key: 'security_hotspots_to_review_status',
  1173. type: 'INT',
  1174. name: 'Security Review To Review Status',
  1175. description: 'Security Review To Review Status',
  1176. domain: 'SecurityReview',
  1177. direction: -1,
  1178. qualitative: false,
  1179. hidden: true,
  1180. },
  1181. new_security_hotspots_to_review_status: {
  1182. key: 'new_security_hotspots_to_review_status',
  1183. type: 'INT',
  1184. name: 'Security Review To Review Status on New Code',
  1185. description: 'Security Review To Review Status on New Code',
  1186. domain: 'SecurityReview',
  1187. direction: -1,
  1188. qualitative: false,
  1189. hidden: true,
  1190. },
  1191. skipped_tests: {
  1192. key: 'skipped_tests',
  1193. type: 'INT',
  1194. name: 'Skipped Unit Tests',
  1195. description: 'Number of skipped unit tests',
  1196. domain: 'Coverage',
  1197. direction: -1,
  1198. qualitative: true,
  1199. hidden: false,
  1200. },
  1201. statements: {
  1202. key: 'statements',
  1203. type: 'INT',
  1204. name: 'Statements',
  1205. description: 'Number of statements',
  1206. domain: 'Size',
  1207. direction: -1,
  1208. qualitative: false,
  1209. hidden: false,
  1210. },
  1211. maintainability_issues: {
  1212. key: 'maintainability_issues',
  1213. type: 'DATA',
  1214. name: 'Maintainability',
  1215. description: 'Maintainability issues',
  1216. domain: 'Issues',
  1217. direction: 0,
  1218. qualitative: false,
  1219. hidden: false,
  1220. },
  1221. new_maintainability_issues: {
  1222. key: 'new_maintainability_issues',
  1223. type: 'DATA',
  1224. name: 'Maintainability',
  1225. description: 'New Maintainability issues',
  1226. domain: 'Issues',
  1227. direction: 0,
  1228. qualitative: false,
  1229. hidden: false,
  1230. },
  1231. sqale_index: {
  1232. key: 'sqale_index',
  1233. type: 'WORK_DUR',
  1234. name: 'Technical Debt',
  1235. description:
  1236. 'Total effort (in hours) to fix all the issues on the component and therefore to comply to all the requirements.',
  1237. domain: 'Maintainability',
  1238. direction: -1,
  1239. qualitative: true,
  1240. hidden: false,
  1241. },
  1242. sqale_debt_ratio: {
  1243. key: 'sqale_debt_ratio',
  1244. type: 'PERCENT',
  1245. name: 'Technical Debt Ratio',
  1246. description:
  1247. 'Ratio of the actual technical debt compared to the estimated cost to develop the whole source code from scratch',
  1248. domain: 'Maintainability',
  1249. direction: -1,
  1250. qualitative: true,
  1251. hidden: false,
  1252. decimalScale: 1,
  1253. },
  1254. new_sqale_debt_ratio: {
  1255. key: 'new_sqale_debt_ratio',
  1256. type: 'PERCENT',
  1257. name: 'Technical Debt Ratio on New Code',
  1258. description: 'Technical Debt Ratio of new/changed code.',
  1259. domain: 'Maintainability',
  1260. direction: -1,
  1261. qualitative: true,
  1262. hidden: false,
  1263. decimalScale: 1,
  1264. },
  1265. maintainability_rating_effort: {
  1266. key: 'maintainability_rating_effort',
  1267. type: 'DATA',
  1268. name: 'Total number of projects having worst maintainability rating',
  1269. domain: 'Maintainability',
  1270. direction: 0,
  1271. qualitative: false,
  1272. hidden: true,
  1273. },
  1274. reliability_rating_effort: {
  1275. key: 'reliability_rating_effort',
  1276. type: 'DATA',
  1277. name: 'Total number of projects having worst reliability rating',
  1278. domain: 'Reliability',
  1279. direction: 0,
  1280. qualitative: false,
  1281. hidden: true,
  1282. },
  1283. security_rating_effort: {
  1284. key: 'security_rating_effort',
  1285. type: 'DATA',
  1286. name: 'Total number of projects having worst security rating',
  1287. domain: 'Security',
  1288. direction: 0,
  1289. qualitative: false,
  1290. hidden: true,
  1291. },
  1292. security_review_rating_effort: {
  1293. key: 'security_review_rating_effort',
  1294. type: 'DATA',
  1295. name: 'Total number of projects having worst security review rating',
  1296. domain: 'Security',
  1297. direction: 0,
  1298. qualitative: false,
  1299. hidden: true,
  1300. },
  1301. releasability_effort: {
  1302. key: 'releasability_effort',
  1303. type: 'INT',
  1304. name: 'Total number of projects not production ready',
  1305. domain: 'Releasability',
  1306. direction: -1,
  1307. qualitative: true,
  1308. hidden: true,
  1309. },
  1310. uncovered_conditions: {
  1311. key: 'uncovered_conditions',
  1312. type: 'INT',
  1313. name: 'Uncovered Conditions',
  1314. description: 'Uncovered conditions',
  1315. domain: 'Coverage',
  1316. direction: -1,
  1317. qualitative: false,
  1318. hidden: false,
  1319. },
  1320. new_uncovered_conditions: {
  1321. key: 'new_uncovered_conditions',
  1322. type: 'INT',
  1323. name: 'Uncovered Conditions on New Code',
  1324. description: 'Uncovered conditions on new code',
  1325. domain: 'Coverage',
  1326. direction: -1,
  1327. qualitative: false,
  1328. hidden: false,
  1329. },
  1330. uncovered_lines: {
  1331. key: 'uncovered_lines',
  1332. type: 'INT',
  1333. name: 'Uncovered Lines',
  1334. description: 'Uncovered lines',
  1335. domain: 'Coverage',
  1336. direction: -1,
  1337. qualitative: false,
  1338. hidden: false,
  1339. },
  1340. new_uncovered_lines: {
  1341. key: 'new_uncovered_lines',
  1342. type: 'INT',
  1343. name: 'Uncovered Lines on New Code',
  1344. description: 'Uncovered lines on new code',
  1345. domain: 'Coverage',
  1346. direction: -1,
  1347. qualitative: false,
  1348. hidden: false,
  1349. },
  1350. test_execution_time: {
  1351. key: 'test_execution_time',
  1352. type: 'MILLISEC',
  1353. name: 'Unit Test Duration',
  1354. description: 'Execution duration of unit tests',
  1355. domain: 'Coverage',
  1356. direction: -1,
  1357. qualitative: false,
  1358. hidden: false,
  1359. },
  1360. test_errors: {
  1361. key: 'test_errors',
  1362. type: 'INT',
  1363. name: 'Unit Test Errors',
  1364. description: 'Number of unit test errors',
  1365. domain: 'Coverage',
  1366. direction: -1,
  1367. qualitative: true,
  1368. hidden: false,
  1369. },
  1370. test_failures: {
  1371. key: 'test_failures',
  1372. type: 'INT',
  1373. name: 'Unit Test Failures',
  1374. description: 'Number of unit test failures',
  1375. domain: 'Coverage',
  1376. direction: -1,
  1377. qualitative: true,
  1378. hidden: false,
  1379. },
  1380. tests: {
  1381. key: 'tests',
  1382. type: 'INT',
  1383. name: 'Unit Tests',
  1384. description: 'Number of unit tests',
  1385. domain: 'Coverage',
  1386. direction: 1,
  1387. qualitative: false,
  1388. hidden: false,
  1389. },
  1390. test_success_density: {
  1391. key: 'test_success_density',
  1392. type: 'PERCENT',
  1393. name: 'Unit Test Success (%)',
  1394. description: 'Density of successful unit tests',
  1395. domain: 'Coverage',
  1396. direction: 1,
  1397. qualitative: true,
  1398. hidden: false,
  1399. decimalScale: 1,
  1400. },
  1401. vulnerabilities: {
  1402. key: 'vulnerabilities',
  1403. type: 'INT',
  1404. name: 'Vulnerabilities',
  1405. description: 'Vulnerabilities',
  1406. domain: 'Security',
  1407. direction: -1,
  1408. qualitative: false,
  1409. hidden: false,
  1410. },
  1411. accepted_issues: {
  1412. key: 'accepted_issues',
  1413. type: 'INT',
  1414. name: 'Accepted Issues',
  1415. description: 'Accepted issues',
  1416. domain: 'Issues',
  1417. direction: -1,
  1418. qualitative: false,
  1419. hidden: false,
  1420. },
  1421. new_accepted_issues: {
  1422. key: 'new_accepted_issues',
  1423. type: 'INT',
  1424. name: 'New Accepted Issues',
  1425. description: 'New Accepted issues',
  1426. domain: 'Issues',
  1427. direction: -1,
  1428. qualitative: false,
  1429. hidden: false,
  1430. },
  1431. };