Skip to content

Commit 200ef01

Browse files
committed
scrutinizr fixs
1 parent a12160f commit 200ef01

1 file changed

Lines changed: 202 additions & 186 deletions

File tree

.scrutinizer.yml

Lines changed: 202 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1,186 +1,202 @@
1-
filter:
2-
excluded_paths:
3-
- tests/*
4-
build:
5-
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'
29-
checks:
30-
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
37-
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
64-
fix_use_statements:
65-
remove_unused: true
66-
preserve_multiple: false
67-
preserve_blanklines: false
68-
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
83-
coding_style:
84-
php:
85-
indentation:
86-
general:
87-
use_tabs: true
88-
size: 4
89-
switch:
90-
indent_case: true
91-
spaces:
92-
general:
93-
linefeed_character: newline
94-
before_parentheses:
95-
function_declaration: false
96-
closure_definition: false
97-
function_call: false
98-
if: true
99-
for: true
100-
while: true
101-
switch: true
102-
catch: true
103-
array_initializer: false
104-
around_operators:
105-
assignment: true
106-
logical: true
107-
equality: true
108-
relational: true
109-
bitwise: true
110-
additive: true
111-
multiplicative: true
112-
shift: true
113-
unary_additive: false
114-
concatenation: false
115-
negation: false
116-
before_left_brace:
117-
class: true
118-
function: true
119-
if: true
120-
else: true
121-
for: true
122-
while: true
123-
do: true
124-
switch: true
125-
try: true
126-
catch: true
127-
finally: true
128-
before_keywords:
129-
else: true
130-
while: true
131-
catch: true
132-
finally: true
133-
within:
134-
brackets: false
135-
array_initializer: false
136-
grouping: false
137-
function_call: false
138-
function_declaration: false
139-
if: false
140-
for: false
141-
while: false
142-
switch: false
143-
catch: false
144-
type_cast: false
145-
ternary_operator:
146-
before_condition: true
147-
after_condition: true
148-
before_alternative: true
149-
after_alternative: true
150-
in_short_version: false
151-
other:
152-
before_comma: false
153-
after_comma: true
154-
before_semicolon: false
155-
after_semicolon: true
156-
after_type_cast: true
157-
braces:
158-
classes_functions:
159-
class: end-of-line
160-
function: end-of-line
161-
closure: end-of-line
162-
if:
163-
opening: end-of-line
164-
always: false
165-
else_on_new_line: false
166-
for:
167-
opening: end-of-line
168-
always: false
169-
while:
170-
opening: end-of-line
171-
always: false
172-
do_while:
173-
opening: end-of-line
174-
always: false
175-
while_on_new_line: false
176-
switch:
177-
opening: end-of-line
178-
try:
179-
opening: end-of-line
180-
catch_on_new_line: false
181-
finally_on_new_line: false
182-
upper_lower_casing:
183-
keywords:
184-
general: lower
185-
constants:
186-
true_false_null: lower
1+
# Scrutinizer CI configuration -- modern format (PHP 8.3, named nodes).
2+
# Reference: https://scrutinizer-ci.com/docs/configuration/build_reference
3+
4+
filter:
5+
excluded_paths:
6+
- 'tests/*'
7+
- 'vendor/*'
8+
dependency_paths:
9+
- 'vendor/*'
10+
11+
build:
12+
environment:
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+
45+
checks:
46+
php:
47+
argument_type_checks: true
48+
avoid_closing_tag: true
49+
avoid_corrupting_byteorder_marks: true
50+
avoid_duplicate_types: true
51+
avoid_fixme_comments: 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
62+
fix_use_statements:
63+
remove_unused: true
64+
preserve_multiple: false
65+
preserve_blanklines: false
66+
order_alphabetically: 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+
94+
coding_style:
95+
php:
96+
indentation:
97+
general:
98+
use_tabs: true
99+
size: 4
100+
switch:
101+
indent_case: true
102+
spaces:
103+
general:
104+
linefeed_character: newline
105+
before_parentheses:
106+
function_declaration: false
107+
closure_definition: false
108+
function_call: false
109+
if: true
110+
for: true
111+
while: true
112+
switch: true
113+
catch: true
114+
array_initializer: false
115+
around_operators:
116+
assignment: true
117+
logical: true
118+
equality: true
119+
relational: true
120+
bitwise: true
121+
additive: true
122+
multiplicative: true
123+
shift: true
124+
unary_additive: false
125+
concatenation: false
126+
negation: false
127+
before_left_brace:
128+
class: true
129+
function: true
130+
if: true
131+
else: true
132+
for: true
133+
while: true
134+
do: true
135+
switch: true
136+
try: true
137+
catch: true
138+
finally: true
139+
before_keywords:
140+
else: true
141+
while: true
142+
catch: true
143+
finally: true
144+
within:
145+
brackets: false
146+
array_initializer: false
147+
grouping: false
148+
function_call: false
149+
function_declaration: false
150+
if: false
151+
for: false
152+
while: false
153+
switch: false
154+
catch: false
155+
type_cast: false
156+
ternary_operator:
157+
before_condition: true
158+
after_condition: true
159+
before_alternative: true
160+
after_alternative: true
161+
in_short_version: false
162+
other:
163+
before_comma: false
164+
after_comma: true
165+
before_semicolon: false
166+
after_semicolon: true
167+
after_type_cast: true
168+
braces:
169+
classes_functions:
170+
class: end-of-line
171+
function: end-of-line
172+
closure: end-of-line
173+
if:
174+
opening: end-of-line
175+
always: false
176+
else_on_new_line: false
177+
for:
178+
opening: end-of-line
179+
always: false
180+
while:
181+
opening: end-of-line
182+
always: false
183+
do_while:
184+
opening: end-of-line
185+
always: false
186+
while_on_new_line: false
187+
switch:
188+
opening: end-of-line
189+
try:
190+
opening: end-of-line
191+
catch_on_new_line: false
192+
finally_on_new_line: false
193+
upper_lower_casing:
194+
keywords:
195+
general: lower
196+
constants:
197+
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)