.scrutinizer.yml 7.3 KB

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