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