.scrutinizer.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. # .scrutinizer.yml
  2. imports:
  3. - javascript
  4. - php
  5. filter:
  6. excluded_paths:
  7. - build/*
  8. - dev/*
  9. - doc/*
  10. - test/*
  11. - htdocs/includes/*
  12. paths:
  13. - htdocs/*
  14. - scripts/*
  15. tools:
  16. # php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
  17. php_analyzer:
  18. enabled: true
  19. extensions:
  20. - php
  21. dependency_paths:
  22. - htdocs/includes/
  23. filter:
  24. excluded_paths:
  25. - build/*
  26. - dev/*
  27. - doc/*
  28. - test/*
  29. - htdocs/includes/*
  30. paths:
  31. - htdocs/
  32. - scripts/
  33. config:
  34. parameter_reference_check:
  35. enabled: true
  36. checkstyle:
  37. enabled: false
  38. no_trailing_whitespace: true
  39. naming:
  40. enabled: true
  41. local_variable: ^[a-z][a-zA-Z0-9]*$
  42. abstract_class_name: ^Abstract|Factory$
  43. utility_class_name: Utils?$
  44. constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
  45. property_name: ^[a-z][a-zA-Z0-9]*$
  46. method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
  47. parameter_name: ^[a-z][a-zA-Z0-9]*$
  48. interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
  49. type_name: ^[A-Z][a-zA-Z0-9]*$
  50. exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
  51. isser_method_name: ^(?:is|has|should|may|supports)
  52. unreachable_code:
  53. enabled: true
  54. check_access_control:
  55. enabled: true
  56. typo_checks:
  57. enabled: true
  58. check_variables:
  59. enabled: true
  60. check_calls:
  61. enabled: true
  62. too_many_arguments: true
  63. missing_argument: true
  64. argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
  65. suspicious_code:
  66. enabled: true
  67. overriding_parameter: false
  68. overriding_closure_use: true
  69. parameter_closure_use_conflict: true
  70. parameter_multiple_times: true
  71. non_existent_class_in_instanceof_check: true
  72. non_existent_class_in_catch_clause: true
  73. assignment_of_null_return: true
  74. non_commented_switch_fallthrough: true
  75. non_commented_empty_catch_block: true
  76. overriding_private_members: true
  77. use_statement_alias_conflict: true
  78. precedence_in_condition_assignment: true
  79. dead_assignments:
  80. enabled: true
  81. verify_php_doc_comments:
  82. enabled: false
  83. parameters: true
  84. return: true
  85. suggest_more_specific_types: true
  86. ask_for_return_if_not_inferrable: true
  87. ask_for_param_type_annotation: true
  88. loops_must_use_braces:
  89. enabled: true
  90. check_usage_context:
  91. enabled: true
  92. simplify_boolean_return:
  93. enabled: false
  94. phpunit_checks:
  95. enabled: false
  96. reflection_checks:
  97. enabled: true
  98. # Checks Common Precedence Mistakes
  99. precedence_checks:
  100. enabled: true
  101. assignment_in_condition: true
  102. comparison_of_bit_result: true
  103. basic_semantic_checks:
  104. enabled: true
  105. # Disabled unused code. In most cases, we want to keep it.
  106. unused_code:
  107. enabled: false
  108. deprecation_checks:
  109. enabled: true
  110. useless_function_calls:
  111. enabled: true
  112. metrics_lack_of_cohesion_methods:
  113. enabled: true
  114. metrics_coupling:
  115. enabled: true
  116. stable_code:
  117. namespace_prefixes: []
  118. classes: []
  119. doctrine_parameter_binding:
  120. enabled: false
  121. doctrine_entity_manager_injection:
  122. enabled: false
  123. symfony_request_injection:
  124. enabled: false
  125. doc_comment_fixes:
  126. enabled: true
  127. reflection_fixes:
  128. enabled: false
  129. use_statement_fixes:
  130. enabled: true
  131. remove_unused: true
  132. # Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
  133. preserve_multiple: false
  134. # Whether you would like to preserve blank lines between use statements.
  135. preserve_blanklines: false
  136. order_alphabetically: false
  137. # To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
  138. # php_depend
  139. php_pdepend:
  140. enabled: false
  141. configuration_file: null
  142. suffixes:
  143. - php
  144. excluded_dirs: { }
  145. filter:
  146. excluded_paths:
  147. - 'build/*'
  148. - 'dev/*'
  149. - 'doc/*'
  150. - 'test/*'
  151. - 'htdocs/includes/*'
  152. paths: { }
  153. # change tracking
  154. php_changetracking:
  155. enabled: false
  156. bug_patterns:
  157. - '\bfix(?:es|ed)?\b'
  158. feature_patterns:
  159. - '\badd(?:s|ed)?\b'
  160. - '\bimplement(?:s|ed)?\b'
  161. filter:
  162. excluded_paths:
  163. - 'build/*'
  164. - 'dev/*'
  165. - 'doc/*'
  166. - 'test/*'
  167. - 'htdocs/includes/*'
  168. paths: { }
  169. # Similar code detection
  170. php_sim:
  171. enabled: false
  172. min_mass: 30
  173. filter:
  174. excluded_paths:
  175. - 'build/*'
  176. - 'dev/*'
  177. - 'doc/*'
  178. - 'test/*'
  179. - 'htdocs/includes/*'
  180. paths: { }
  181. php_changetracking:
  182. enabled: false
  183. bug_patterns:
  184. - '\bfix(?:es|ed)?\b'
  185. feature_patterns:
  186. - '\badd(?:s|ed)?\b'
  187. - '\bimplement(?:s|ed)?\b'
  188. filter:
  189. excluded_paths:
  190. - 'build/*'
  191. - 'dev/*'
  192. - 'doc/*'
  193. - 'test/*'
  194. - 'htdocs/includes/*'
  195. paths: { }
  196. # Coding-Style / Bug Detection
  197. js_hint:
  198. enabled: false
  199. use_native_config: true
  200. extensions:
  201. - js
  202. filter:
  203. excluded_paths:
  204. - 'build/*'
  205. - 'dev/*'
  206. - 'doc/*'
  207. - 'test/*'
  208. - 'htdocs/includes/*'
  209. paths: { }
  210. config: { }
  211. path_configs: { }
  212. before_commands: { }
  213. after_commands: { }
  214. artifacts: { }
  215. build_failure_conditions: { }