Checkout Config
checks:
php:
code_rating: true
duplication: true
build_failure_conditions:
- 'project.metric_change("scrutinizer.quality", < -0.10)'
- 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse
- 'issues.label("coding-style").exists' # No coding style issues allowed
- 'issues.severity(>= MAJOR).exists' # New major or higher severity issues
- 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9
- 'project.metric("scrutinizer.test_coverage", < 1)' # Code Coverage must alway be 100%
- 'patches.label("Doc Comments").exists' # No doc comments patches allowed
- 'patches.label("Spacing").exists' # No spacing patches allowed
build:
nodes:
codingstyle:
tests:
stop_on_failure: true
override:
- make test-codestyle
coverage:
tests:
stop_on_failure: true
override:
-
command: make test-coverage-clover
idle_timeout: 1200
coverage:
file: 'build/coverage/clover.xml'
format: 'php-clover'
cache:
directories:
- ~/.composer
- vendor
dependencies:
override:
- make ci-build
environment:
php:
version: "7.0"
timezone: UTC
mysql: false
postgresql: false
elasticsearch: false
redis: false
node: false
checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: true
side_effects_or_types: true
no_mixed_inline_html: false
require_braces_around_control_structures: true
php5_style_constructor: false
no_global_keyword: true
avoid_usage_of_logical_operators: false
psr2_class_declaration: true
no_underscore_prefix_in_properties: true
no_underscore_prefix_in_methods: true
blank_line_after_namespace_declaration: true
single_namespace_per_use: true
psr2_switch_declaration: true
psr2_control_structure_declaration: true
avoid_superglobals: true
security_vulnerabilities: true
no_exit: true
filter:
paths:
- src/*
coding_style:
php:
spaces:
before_parentheses:
closure_definition: true
around_operators:
concatenation: false
Repository Config
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
environment:
node:
version: 6.0.0
tests: true
checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: false
side_effects_or_types: false
no_mixed_inline_html: false
require_braces_around_control_structures: false
php5_style_constructor: false
no_global_keyword: false
avoid_usage_of_logical_operators: false
psr2_class_declaration: false
no_underscore_prefix_in_properties: false
no_underscore_prefix_in_methods: false
blank_line_after_namespace_declaration: false
single_namespace_per_use: false
psr2_switch_declaration: false
psr2_control_structure_declaration: false
avoid_superglobals: false
security_vulnerabilities: false
no_exit: false
coding_style:
php: { }
filter: { }