.scrutinizer.yml 7.6 KB

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