test.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /* comment here per global region
  2. *
  3. * metrix++: suppress std.code.length:total
  4. * metrix++: suppress std.general:size
  5. * metrix++: suppress std.general:size intentional duplicate
  6. */
  7. /*metrix++: suppress std.code.length:total*/
  8. int func()
  9. {
  10. /* comment here */
  11. }
  12. int func2()
  13. {
  14. /*metrix++: suppress std.code.length:total*/
  15. }
  16. /* metrix++: suppress std.code.length:total */
  17. int func3()
  18. {
  19. /* metrix++: suppress std.code.length:total*/
  20. }
  21. /* bla-bla */
  22. /* metrix++: suppress std.code.length:total */
  23. /* bla-bla */
  24. int func4()
  25. {
  26. /* metrix++: suppress std.code.length:total*/
  27. }
  28. /* metrix++: suppress std.code.length:total */
  29. struct cl1
  30. {
  31. };
  32. struct cl2
  33. {
  34. /* metrix++: suppress std.code.length:total*/
  35. };
  36. // bla-bla
  37. //metrix++: suppress std.code.length:total
  38. // bla-bla
  39. struct cl3
  40. {
  41. };
  42. /* bla-bla-bla */
  43. struct no_suppress_cl
  44. {
  45. };
  46. /* bla-bla-bla */
  47. int nu_suppress_func()
  48. {
  49. /* bla-bla-bla */
  50. }
  51. struct cl2
  52. {
  53. /* metrix++: suppress std.code.length:total per class */
  54. /* metrix++: suppress std.code.length:total per function */
  55. int func4()
  56. {
  57. }
  58. int func_no_suppress_within_struct()
  59. {
  60. }
  61. };
  62. /* metrix++: suppress invalid:metric */
  63. struct suppresed_for_invalid_metric
  64. {
  65. };
  66. /* metrix++: suppress std.code.length:invlaid_metric */
  67. struct suppresed_for_invalid_metric
  68. {
  69. };
  70. /* metrix++: suppress invalid:metric */
  71. /* metrix++: suppress std.code.length:total */
  72. struct suppressed_for_size_and_invalid_metric
  73. {
  74. };
  75. /* metrix++: suppress invalid:metric */
  76. /* metrix++: suppress std.code.length:total */
  77. /* metrix++: suppress std.code.complexity:cyclomatic */
  78. int suppressed_for_size_and_complexity_and_invalid_metric()
  79. {
  80. if (1) return;
  81. }
  82. // metrix++: suppress std.code.length:total asdas
  83. // metrix++: suppress std.code.complexity:cyclomatic adsad
  84. int func7()
  85. {
  86. if (1) return;
  87. }
  88. // metrix++: suppress std.code.complexity:cyclomatic adsad
  89. int nu_suppress_for_size()
  90. {
  91. if (1) return;
  92. }
  93. // metrix++: suppress std.code.length:total adsad
  94. int no_suppress_for_cyclomatic_complexity()
  95. {
  96. if (1) return;
  97. }
  98. // metrix++: suppress std.code.length:total long-long
  99. // description why it was suppressed
  100. // metrix++: suppress std.code.complexity:cyclomatic
  101. int func8()
  102. {
  103. if (1) return;
  104. }
  105. /* metrix++: suppress std.code.length:total long-long */
  106. /* description why it was suppressed */
  107. /* metrix++: suppress std.code.complexity:cyclomatic */
  108. int func9()
  109. {
  110. if (1) return;
  111. }
  112. // metrix++: suppress std.code.complexity:cyclomatic adsad
  113. int bad_suppress_for_size()
  114. {
  115. // metrix++: suppress std.code.length:total
  116. if (1) return;
  117. }
  118. /* metrix++: suppress std.code.length:total long-long
  119. * description why it was suppressed
  120. * metrix++: suppress std.code.complexity:cyclomatic */
  121. int func10()
  122. {
  123. if (1) return;
  124. }
  125. /* metrix++: suppress std.code.length:total
  126. * metrix++: suppress std.code.length:total */
  127. int duplicate_suppression_of_size()
  128. {
  129. }
  130. /* metrix++: suppress std.general:size intentional suppression per file metric
  131. * metrix++: suppress std.code.length:total */
  132. int bad_suppression_of_file_size()
  133. {
  134. }