.scrutinizer.yml 7.4 KB

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