Skip to content

Commit df10970

Browse files
committed
scrutinizr fixs
1 parent 641e043 commit df10970

1 file changed

Lines changed: 86 additions & 70 deletions

File tree

.scrutinizer.yml

Lines changed: 86 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,96 @@
1+
# Scrutinizer CI configuration -- modern format (PHP 8.3, named nodes).
2+
# Reference: https://scrutinizer-ci.com/docs/configuration/build_reference
3+
14
filter:
25
excluded_paths:
3-
- tests/*
6+
- 'tests/*'
7+
- 'vendor/*'
8+
dependency_paths:
9+
- 'vendor/*'
10+
411
build:
512
environment:
6-
php: 7.0
7-
cache:
8-
disabled: false
9-
directories:
10-
- ~/.composer/cache
11-
- tmp/
12-
- vendor/
13-
- composer.lock
14-
dependencies:
15-
override:
16-
- composer self-update
17-
- composer install --no-interaction --dev --prefer-dist --ansi
18-
tests:
19-
override:
20-
#- jshint-run $(ls public_html/js/*.js)
21-
#- shellcheck-run -s bash $(ls scripts/*/*.sh)
22-
#- csslint-run --exclude-list=public_html/css/domains.css,public_html/css/minified,public_html/css/reset.css,public_html/css/price_win.css public_html/css
23-
-
24-
command: 'vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v --coverage-clover coverage.xml --whitelist src/'
25-
#command: 'phpdbg -qrr vendor/bin/phpunit --bootstrap vendor/autoload.php tests/ -v --coverage-clover coverage.xml --whitelist src/'
26-
coverage:
27-
file: 'coverage.xml'
28-
format: 'clover'
13+
php:
14+
version: '8.3'
15+
ini:
16+
'date.timezone': 'America/New_York'
17+
'memory_limit': '512M'
18+
variables:
19+
COMPOSER_DISCARD_CHANGES: 'true'
20+
21+
nodes:
22+
analysis:
23+
tests:
24+
override:
25+
- php-scrutinizer-run
26+
27+
tests:
28+
cache:
29+
disabled: false
30+
directories:
31+
- ~/.composer/cache
32+
- vendor/
33+
dependencies:
34+
override:
35+
- 'composer self-update --no-interaction'
36+
- 'composer install --no-interaction --prefer-dist --no-progress --ansi'
37+
tests:
38+
override:
39+
-
40+
command: 'vendor/bin/phpunit --coverage-clover=coverage.xml'
41+
coverage:
42+
file: 'coverage.xml'
43+
format: 'clover'
44+
2945
checks:
3046
php:
31-
duplication: true
32-
uppercase_constants: true
33-
return_doc_comment_if_not_inferrable: true
34-
return_doc_comments: true
35-
remove_extra_empty_lines: true
36-
phpunit_assertions: true
47+
argument_type_checks: true
48+
avoid_closing_tag: true
49+
avoid_corrupting_byteorder_marks: true
50+
avoid_duplicate_types: true
3751
avoid_fixme_comments: true
38-
param_doc_comment_if_not_inferrable: true
39-
parameter_doc_comments: true
40-
simplify_boolean_return: true
41-
remove_extra_empty_lines: true
42-
property_assignments: true
43-
properties_in_camelcaps: true
44-
precedence_mistakes: true
45-
precedence_in_conditions: true
46-
phpunit_assertions: true
47-
php5_style_constructor: true
48-
parse_doc_comments: true
49-
parameters_in_camelcaps: true
50-
parameter_doc_comments: true
51-
param_doc_comment_if_not_inferrable: true
52-
one_class_per_file: true
53-
non_commented_empty_catch_block: true
54-
no_unnecessary_if: true
55-
no_trailing_whitespace: true
56-
no_short_open_tag: true
57-
no_non_implemented_abstract_methods: true
58-
no_goto: true
59-
no_long_variable_names:
60-
maximum: '25'
61-
more_specific_types_in_doc_comments: true
62-
missing_arguments: true
63-
instanceof_class_exists: true
52+
avoid_perl_style_comments: true
53+
avoid_usage_of_logical_operators: true
54+
blank_line_after_namespace_declaration: true
55+
code_rating: true
56+
comparison_always_same_result: true
57+
deadlock_detection_in_loops: true
58+
deprecated_code_usage: true
59+
duplication: true
60+
encourage_shallow_comparison: true
61+
fix_doc_comments: true
6462
fix_use_statements:
6563
remove_unused: true
6664
preserve_multiple: false
6765
preserve_blanklines: false
6866
order_alphabetically: true
69-
fix_doc_comments: true
70-
encourage_shallow_comparison: true
71-
deprecated_code_usage: true
72-
deadlock_detection_in_loops: true
73-
comparison_always_same_result: true
74-
code_rating: true
75-
blank_line_after_namespace_declaration: true
76-
avoid_usage_of_logical_operators: true
77-
avoid_perl_style_comments: true
78-
avoid_fixme_comments: true
79-
avoid_duplicate_types: true
80-
avoid_corrupting_byteorder_marks: true
81-
avoid_closing_tag: true
82-
argument_type_checks: true
67+
instanceof_class_exists: true
68+
missing_arguments: true
69+
more_specific_types_in_doc_comments: true
70+
no_goto: true
71+
no_long_variable_names:
72+
maximum: '25'
73+
no_non_implemented_abstract_methods: true
74+
no_short_open_tag: true
75+
no_trailing_whitespace: true
76+
no_unnecessary_if: true
77+
non_commented_empty_catch_block: true
78+
one_class_per_file: true
79+
param_doc_comment_if_not_inferrable: true
80+
parameter_doc_comments: true
81+
parameters_in_camelcaps: true
82+
parse_doc_comments: true
83+
phpunit_assertions: true
84+
precedence_in_conditions: true
85+
precedence_mistakes: true
86+
properties_in_camelcaps: true
87+
property_assignments: true
88+
remove_extra_empty_lines: true
89+
return_doc_comment_if_not_inferrable: true
90+
return_doc_comments: true
91+
simplify_boolean_return: true
92+
uppercase_constants: true
93+
8394
coding_style:
8495
php:
8596
indentation:
@@ -184,3 +195,8 @@ coding_style:
184195
general: lower
185196
constants:
186197
true_false_null: lower
198+
199+
build_failure_conditions:
200+
- 'elements.rating(<= D).new.exists' # No new D-or-worse rated elements
201+
- 'issues.severity(>= MAJOR).new.exists' # No new MAJOR+ severity issues
202+
- 'project.metric_change("scrutinizer.test_coverage", < -0.05)' # Coverage cannot drop more than 5%

0 commit comments

Comments
 (0)