forked from Apiki/wpsteak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scrutinizer.yml
46 lines (45 loc) · 2.04 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
checks:
php: true
filter:
dependency_paths:
- wordpress/
excluded_paths:
- '/tests/*'
- '*/build/*'
- '.sami.php'
build_failure_conditions:
- 'project.metric_change("scrutinizer.quality", < -0.10)'
- 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse
- 'elements.rating(<= D).new.exists' # No new classes/methods with a rating of D or worse allowed
- 'issues.label("coding-style").exists' # No coding style issues allowed
- 'issues.label("coding-style").new.exists' # No new coding style issues allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- '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", < 0.20)' # Code Coverage drops below 20%
- 'project.metric_change("scrutinizer.test_coverage", < -0.1)' # Code Coverage decreased from previous inspection by more than 10%
- 'patches.label("Doc Comments").exists' # No doc comments patches allowed
- 'patches.label("Spacing").exists' # No spacing patches allowed
build:
environment:
php:
version: 7.4
dependencies:
override:
- composer install --ignore-platform-reqs --no-interaction
nodes:
analysis:
dependencies:
before:
- composer require --dev johnpbloch/wordpress
tests:
override:
- php-scrutinizer-run
- phpcs-run
coverage:
tests:
override:
- command: composer test
coverage:
file: tests/_reports/logs/clover.xml
format: clover