.scrutinizer.yml 7.5 KB

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