.scrutinizer.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. build:
  2. nodes:
  3. php-scrutinizer-run:
  4. project_setup:
  5. override: true
  6. tests:
  7. override: [php-scrutinizer-run]
  8. environment:
  9. mysql: false
  10. redis: false
  11. postgresql: false
  12. php:
  13. version: 7.2
  14. ini:
  15. 'zend.assertions': '1'
  16. 'assert.exception': '1'
  17. dependencies:
  18. override:
  19. -
  20. command: 'composer install'
  21. tests:
  22. override: true
  23. project_setup:
  24. override: true
  25. filter:
  26. paths:
  27. - src/*
  28. excluded_paths:
  29. - examples/*
  30. - tests/*
  31. - vendor/*
  32. tools:
  33. php_cpd: true
  34. php_pdepend: true
  35. php_analyzer: true
  36. php_sim: true
  37. php_changetracking: true
  38. php_mess_detector: true
  39. php_code_sniffer: true
  40. sensiolabs_security_checker: true
  41. php_code_coverage: true
  42. php_pdepend:
  43. excluded_dirs: [vendor, doc, examples, build, tests]
  44. external_code_coverage:
  45. timeout: 1300
  46. runs: 1
  47. changetracking:
  48. bug_patterns: ["\bfix(?:es|ed)?\b"]
  49. feature_patterns: ["\badd(?:s|ed)?\b", "\bimplement(?:s|ed)?\b"]
  50. build_failure_conditions:
  51. # No new critical issue is introduced (existing ones are tolerated)
  52. - 'issues.severity(>= CRITICAL).new.exists'
  53. # Code Coverage drops below 60%
  54. - 'project.metric("scrutinizer.test_coverage", < 0.80)'
  55. # Code Coverage decreased from previous inspection by more than 1%
  56. - 'project.metric_change("scrutinizer.test_coverage", < -0.01)'
  57. checks:
  58. php:
  59. simplify_boolean_return: true
  60. return_doc_comments: true
  61. return_doc_comment_if_not_inferrable: true
  62. remove_extra_empty_lines: true
  63. properties_in_camelcaps: true
  64. phpunit_assertions: true
  65. parameters_in_camelcaps: true
  66. parameter_doc_comments: true
  67. param_doc_comment_if_not_inferrable: true
  68. overriding_parameter: true
  69. no_short_variable_names:
  70. minimum: '3'
  71. no_short_method_names:
  72. minimum: '3'
  73. no_long_variable_names:
  74. maximum: '20'
  75. no_goto: true
  76. fix_use_statements:
  77. remove_unused: true
  78. preserve_multiple: false
  79. preserve_blanklines: false
  80. order_alphabetically: false
  81. fix_line_ending: true
  82. check_method_contracts:
  83. verify_interface_like_constraints: true
  84. verify_documented_constraints: true
  85. verify_parent_constraints: true