|
| 1 | +build_failure_conditions: |
| 2 | + - 'project.metric_change("scrutinizer.quality", < -0.30)' |
| 3 | + - 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse |
| 4 | + - 'issues.severity(>= MAJOR).exists' # New major or higher severity issues |
| 5 | + - 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9 |
| 6 | + - 'project.metric("scrutinizer.test_coverage", < 1)' # Code Coverage must alway be 100% |
| 7 | + - 'patches.label("Doc Comments").exists' # No doc comments patches allowed |
| 8 | + - 'patches.label("Spacing").exists' # No spacing patches allowed |
| 9 | + - 'patches.label("Bug").exists' # No bug patches allowed |
| 10 | + - 'issues.label("coding-style").exists' # No coding style issues allowed |
| 11 | +build: |
| 12 | + dependencies: |
| 13 | + override: |
| 14 | + - make build |
| 15 | + tests: |
| 16 | + stop_on_failure: true |
| 17 | + override: |
| 18 | + - php-scrutinizer-run --enable-security-analysis |
| 19 | + - |
| 20 | + command: make codestyle |
| 21 | + analysis: |
| 22 | + file: 'build/reports/cs-data' |
| 23 | + format: 'php-cs-checkstyle' |
| 24 | + - |
| 25 | + command: make coverage |
| 26 | + idle_timeout: 1200 |
| 27 | + coverage: |
| 28 | + file: 'build/coverage/clover.xml' |
| 29 | + format: 'php-clover' |
| 30 | + cache: |
| 31 | + directories: |
| 32 | + - ~/.composer |
| 33 | + - vendor |
| 34 | + |
| 35 | + environment: |
| 36 | + variables: |
| 37 | + CI: 'true' |
| 38 | + TEST_OUTPUT_STYLE: 'pretty' |
| 39 | + COMPOSER_OPTIONS: '--optimize-autoloader' |
| 40 | + COVERAGE_OUTPUT_STYLE: 'clover' |
| 41 | + COVERAGE_CLOVER_FILE_PATH: 'build/coverage/clover.xml' |
| 42 | + PHPCS_REPORT_STYLE: 'checkstyle' |
| 43 | + PHPCS_REPORT_FILE: 'build/reports/cs-data' |
| 44 | + php: |
| 45 | + version: "7.1" |
| 46 | + timezone: UTC |
| 47 | + postgresql: false |
| 48 | + redis: false |
| 49 | +filter: |
| 50 | + paths: |
| 51 | + - src/* |
| 52 | +checks: |
| 53 | + php: |
| 54 | + code_rating: true |
| 55 | + duplication: true |
| 56 | + no_debug_code: true |
| 57 | + check_method_contracts: |
| 58 | + verify_interface_like_constraints: true |
| 59 | + verify_documented_constraints: true |
| 60 | + verify_parent_constraints: true |
| 61 | + simplify_boolean_return: true |
| 62 | + return_doc_comments: true |
| 63 | + return_doc_comment_if_not_inferrable: true |
| 64 | + remove_extra_empty_lines: true |
| 65 | + properties_in_camelcaps: true |
| 66 | + phpunit_assertions: true |
| 67 | + parameters_in_camelcaps: true |
| 68 | + parameter_doc_comments: true |
| 69 | + param_doc_comment_if_not_inferrable: true |
| 70 | + overriding_parameter: true |
| 71 | + no_trailing_whitespace: true |
| 72 | + no_short_variable_names: |
| 73 | + minimum: '3' |
| 74 | + no_short_method_names: |
| 75 | + minimum: '3' |
| 76 | + no_long_variable_names: |
| 77 | + maximum: '20' |
| 78 | + no_goto: true |
| 79 | + naming_conventions: |
| 80 | + local_variable: '^[a-z][a-zA-Z0-9]*$' |
| 81 | + abstract_class_name: ^Abstract|Factory$ |
| 82 | + utility_class_name: 'Utils?$' |
| 83 | + constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$' |
| 84 | + property_name: '^[a-z][a-zA-Z0-9]*$' |
| 85 | + method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$' |
| 86 | + parameter_name: '^[a-z][a-zA-Z0-9]*$' |
| 87 | + interface_name: '^[A-Z][a-zA-Z0-9]*Interface$' |
| 88 | + type_name: '^[A-Z][a-zA-Z0-9]*$' |
| 89 | + exception_name: '^[A-Z][a-zA-Z0-9]*Exception$' |
| 90 | + isser_method_name: '^(?:is|has|should|may|supports)' |
| 91 | + more_specific_types_in_doc_comments: true |
| 92 | + fix_doc_comments: false |
0 commit comments